| Server IP : 103.161.17.216 / Your IP : 216.73.216.1 Web Server : nginx/1.18.0 System : Linux tipsysaigoncharming 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64 User : www-data ( 33) PHP Version : 7.4.3-4ubuntu2.29 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare, MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /var/www/app.houseland.info/application/migrations/ |
Upload File : |
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Migration_Version_170 extends CI_Migration
{
function __construct()
{
parent::__construct();
}
public function up()
{
$this->db->query("ALTER TABLE `tblitems` ADD `tax2` INT NOT NULL DEFAULT '0' AFTER `tax`;");
$this->db->query("ALTER TABLE `tblitems` ADD INDEX(`tax`);");
$this->db->query("ALTER TABLE `tblitems` ADD INDEX(`tax2`);");
$this->db->query("ALTER TABLE `tblitems` CHANGE `tax2` `tax2` INT(11) NULL DEFAULT NULL;");
$this->db->query("ALTER TABLE `tblreminders` ADD INDEX(`rel_id`);");
$this->db->query("ALTER TABLE `tblreminders` ADD INDEX(`rel_type`);");
$this->db->query("ALTER TABLE `tblevents` ADD `reminder_before` INT NOT NULL DEFAULT '0' AFTER `isstartnotified`;");
$this->db->query("ALTER TABLE `tblevents` ADD `reminder_before_type` VARCHAR(10) NULL AFTER `reminder_before`;");
$this->db->update(db_prefix().'events',array('reminder_before_type'=>'minutes'));
add_option('contract_expiry_reminder_enabled',1);
add_option('time_format',24);
add_option('delete_activity_log_older_then',2);
add_option('disable_language',0);
add_option('new_task_auto_assign_current_member',0);
add_option('company_state','');
$this->db->where('name','calendar_task_color');
$this->db->delete(db_prefix().'options');
$default_tax = get_option('default_tax');
if($default_tax != ''){
$default_tax = explode('+',$default_tax);
$i = 0;
foreach($default_tax as $d){
if($d == ''){
unset($default_tax[$i]);
}
$i++;
}
$default_tax = array_values($default_tax);
} else {
$default_tax = array();
}
update_option('default_tax',serialize($default_tax));
$this->db->query("ALTER TABLE `tblnotifications` ADD `isread_inline` BOOLEAN NOT NULL DEFAULT FALSE AFTER `isread`;");
$this->db->query("ALTER TABLE `tblexpenses` ADD `tax2` INT NOT NULL DEFAULT '0' AFTER `tax`;");
$this->db->where('isread',1);
$this->db->update(db_prefix().'notifications',array('isread_inline'=>1));
$this->db->query("ALTER TABLE `tbltaskstimers` ADD `note` TEXT NULL AFTER `hourly_rate`;");
$this->db->query("ALTER TABLE `tblleads` ADD `default_language` VARCHAR(40) NULL AFTER `is_public`;");
$this->db->query("ALTER TABLE `tblleadsintegration` ADD `mark_public` INT NOT NULL DEFAULT '0' AFTER `notify_ids`;");
$this->db->query("ALTER TABLE `tblwebtolead` ADD `mark_public` INT NOT NULL DEFAULT '0' AFTER `allow_duplicate`;");
$this->db->query("CREATE TABLE IF NOT EXISTS `tblvault` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`customer_id` int(11) NOT NULL,
`server_address` varchar(400) NOT NULL,
`port` int(11) DEFAULT NULL,
`username` varchar(300) NOT NULL,
`password` text NOT NULL,
`description` text,
`creator` int(11) NOT NULL,
`creator_name` varchar(100) DEFAULT NULL,
`visibility` tinyint(1) NOT NULL DEFAULT '1',
`last_updated` datetime DEFAULT NULL,
`last_updated_from` varchar(100) DEFAULT NULL,
`date_created` datetime NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;");
update_option('update_info_message', '<div class="col-md-12">
<div class="alert alert-success bold">
<h4 class="bold">Hi! Thanks for updating Perfex CRM - You are using version 1.7.0</h4>
<p>
This window will reload automaticaly in 10 seconds and will try to clear your browser cache, however its recomended to clear your browser cache manually.
</p>
</div>
</div>
<script>
setTimeout(function(){
window.location.reload();
},10000);
</script>
');
}
}