コード例 #1
0
ファイル: ssb_review.php プロジェクト: gittrue/VIF
 public static function getInstance()
 {
     if (self::$Instance == NULL) {
         $class = __CLASS__;
         self::$Instance = new $class();
     }
     return self::$Instance;
 }
コード例 #2
0
ファイル: gen_reviews.php プロジェクト: gittrue/VIF
 function __construct()
 {
     global $registry;
     parent::__construct($registry);
     require_once DIR_CONFIG . 'ssb_library/admin/generators/ssb_review.php';
     $this->ssb_review = ssb_review::getInstance();
     require_once DIR_CONFIG . 'ssb_library/ssb_helper.php';
     $this->ssb_helper = ssb_helper::getInstance();
     require_once DIR_CONFIG . 'ssb_library/ssb_data.php';
     $this->ssb_data = ssb_data::getInstance();
     require_once DIR_CONFIG . 'ssb_library/admin/generators/gen_helper.php';
     $this->gen_helper = gen_helper::getInstance();
 }
コード例 #3
0
ファイル: ssb_data.php プロジェクト: gittrue/VIF
 public function getReviewName($data = array('page' => 1, 'l_code' => ''))
 {
     require_once DIR_CONFIG . 'ssb_library/admin/generators/ssb_review.php';
     $ssb_review = ssb_review::getInstance();
     $respond = $ssb_review->getName($data);
     return $respond;
 }
コード例 #4
0
ファイル: ssb_default.php プロジェクト: gittrue/VIF
 private function fillTables($case)
 {
     $result_text = '';
     switch ($case) {
         case 'relatedProductsIndex':
             $result_text = "       \$sql = \"SHOW INDEX FROM \" . DB_PREFIX . \"product_description WHERE Key_name='relatedProducts'\";       \$query = \$this->db->query(\$sql);       if(!count(\$query->rows)){        \$this->db->query(\"ALTER TABLE " . DB_PREFIX . "product_description ENGINE=MYISAM;\");        \$this->db->query(\"ALTER TABLE " . DB_PREFIX . "product_description MODIFY name VARCHAR(255) CHARACTER SET utf8;\");        \$this->db->query(\"ALTER TABLE " . DB_PREFIX . "product_description MODIFY description TEXT CHARACTER SET utf8;\");        \$this->db->query(\"CREATE FULLTEXT INDEX relatedProducts ON " . DB_PREFIX . "product_description (name,description);\");       }";
             break;
         case 'brandFillDescrip':
             $result_text = "       include_once DIR_CONFIG .'ssb_library/ssb_helper.php';       \$this->ssb_helper = ssb_helper::getInstance();       \$languages = \$this->ssb_helper->getLanguages();       \$this->load->model('catalog/manufacturer');       \$brands = \$this->model_catalog_manufacturer->getManufacturers();       foreach (\$brands as \$brand) {        \$this->model_catalog_manufacturer->setDescripManufacturer(\$brand['manufacturer_id'], array(), true);       }      ";
             break;
         case 'countryFill':
             $countries_sql = '';
             include_once DIR_CONFIG . 'ssb_library/admin/sql/countries.php';
             $result_text = "       \$exist_query =  \$this->db->query(\"SELECT * FROM \" . DB_PREFIX . \"wc_countries\");       if(!\$exist_query->num_rows){        \$this->load->model('superseobox/index');        \$this->db->query(\"" . $countries_sql . "\");       }";
             break;
         case 'continentFill':
             $continents_sql = '';
             include_once DIR_CONFIG . 'ssb_library/admin/sql/continents.php';
             $result_text = "       \$exist_query =  \$this->db->query(\"SELECT * FROM \" . DB_PREFIX . \"wc_continents\");       if(!\$exist_query->num_rows){        \$this->load->model('superseobox/index');        \$this->db->query(\"" . $continents_sql . "\");       }";
             break;
         case 'reviewNameFill':
             require_once DIR_CONFIG . 'ssb_library/admin/generators/ssb_review.php';
             $ssb_review = ssb_review::getInstance();
             $result_text = "       \$sql = \"DELETE FROM " . DB_PREFIX . "review_name WHERE 1;\";       \$query = \$this->db->query(\$sql);       \$sql = \"" . $ssb_review->getSQlReviews('review_name') . "\";       \$query = \$this->db->query(\$sql);";
             break;
         case 'reviewTemplateFill':
             require_once DIR_CONFIG . 'ssb_library/admin/generators/ssb_review.php';
             $ssb_review = ssb_review::getInstance();
             $result_text = "       \$sql = \"DELETE FROM " . DB_PREFIX . "review_template WHERE 1;\";       \$query = \$this->db->query(\$sql);       \$sql = \"" . $ssb_review->getSQlReviews('review_template') . "\";       \$query = \$this->db->query(\$sql);";
             break;
     }
     return $result_text;
 }
コード例 #5
0
ファイル: superseobox.php プロジェクト: gittrue/VIF
 private function restoreAllRewievItem($data)
 {
     require_once DIR_CONFIG . 'ssb_library/admin/generators/ssb_review.php';
     $ssb_review = ssb_review::getInstance();
     $ssb_review->restoreAll($data);
     $this->respondAnswer('', "Restoring done!", $data);
 }