예제 #1
0
 /**
  * Function gets the attribute values from the attribute table. 
  * 
  * @param string $name
  * @return array
  */
 function getAttribListValues($name)
 {
     if ($name == 'attrib') {
         $sql = "SELECT * FROM attribute_table ";
         $cquery = new Lib_Query();
         if ($cquery->executeQuery($sql)) {
             $records = $cquery->records;
         }
         $attrib = array("all" => "All attributes");
         for ($i = 0; $i < count($records); $i++) {
             $attrib[$records[$i]['attrib_id']] = $records[$i]['attrib_name'];
         }
         return $attrib;
     }
 }
예제 #2
0
 /**
  * This function is used to check the directory in installation process
  *
  * 
  * 
  * @return void
  */
 public function checkDir()
 {
     $path = '../uploadedimages/test/best_sell2.jpg';
     $test = '../images/best_sell2.jpg';
     @mkdir('../uploadedimages/test', 0777);
     @copy($test, $path);
     if (file_exists($path)) {
         $sql = "UPDATE `site_setting` SET `folder_creation`=1 WHERE `site_set_id`=1";
         $obj = new Lib_Query();
         $obj->updateQuery($sql);
         unlink($path);
         unlink('../uploadedimages/test');
     } else {
         unlink('../uploadedimages/test');
     }
 }