Script URL:
Version of script:2.2
Hosting company:
URL of phpinfo.php:
URL of session_test.php:
What terms did you try when SEARCHING for a solution:lock, auto lock
Write your message below:
Is it possible that tickets what are older as 3 months are automatic locked?
This so that the ticket can be seen but cannot reply anymore.
Thnx!
Auto lock
Moderator: mkoch227
1. BACKUP your files and database
2. This should help you lock all closed tickets that aren't locked already: save this code as "lock_all.php" (or some other name), upload to the admin folder, login to hesk and open lock_all.php in the browser (you will need to be logged in as Admin or staff with appropriate permission).
2. This should help you lock all closed tickets that aren't locked already: save this code as "lock_all.php" (or some other name), upload to the admin folder, login to hesk and open lock_all.php in the browser (you will need to be logged in as Admin or staff with appropriate permission).
Code: Select all
<?php
define('IN_SCRIPT',1);
define('HESK_PATH','../');
/* Get all the required files and functions */
require(HESK_PATH . 'hesk_settings.inc.php');
require(HESK_PATH . 'inc/common.inc.php');
require(HESK_PATH . 'inc/database.inc.php');
hesk_session_start();
hesk_dbConnect();
hesk_isLoggedIn();
/* Check permissions for this feature */
hesk_checkPermission('can_view_tickets');
hesk_checkPermission('can_reply_tickets');
hesk_checkPermission('can_edit_tickets');
$revision = sprintf($hesklang['thist5'],hesk_date(),$_SESSION['name'].' ('.$_SESSION['user'].')');
$sql = 'UPDATE `'.$hesk_settings['db_pfix'].'tickets` SET `locked`=\'1\', `history`=CONCAT(`history`,\''.hesk_dbEscape($revision).'\') WHERE `status` = \'3\' AND `locked` = \'0\'';
hesk_dbQuery($sql);
?>
<p>OLD tickets locked, <a href="admin_main.php">click to continue</a></p>
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here 
You should follow me on Twitter here
Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...
Also browse for php hosting companies, read php books, find php resources and use webmaster tools


Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...
Also browse for php hosting companies, read php books, find php resources and use webmaster tools
You have to do than somethink like this i think don't know the date table name (and also don't have a open check in it)
$sql = 'UPDATE `'.$hesk_settings['db_pfix'].'tickets` SET `locked`=\'1\', `history`=CONCAT(`history`,\''.hesk_dbEscape($revision).'\') WHERE `status` = \'3\' AND `locked` = \'0\'' AND 'date' < DATE_SUB(NOW(), INTERVAL 90 DAY);
hesk_dbQuery($sql);
$sql = 'UPDATE `'.$hesk_settings['db_pfix'].'tickets` SET `locked`=\'1\', `history`=CONCAT(`history`,\''.hesk_dbEscape($revision).'\') WHERE `status` = \'3\' AND `locked` = \'0\'' AND 'date' < DATE_SUB(NOW(), INTERVAL 90 DAY);
hesk_dbQuery($sql);