function add($id_parent, $name, $description, $image, $auth, $visible)
 {
     global $Sql;
     if ($id_parent == 0 || array_key_exists($id_parent, $this->cache_var)) {
         $new_id_cat = parent::add($id_parent, $name);
         $Sql->query_inject("UPDATE " . PREFIX . "download_cat SET contents = '" . $description . "', icon = '" . $image . "', auth = '" . $auth . "', visible = '" . (int) $visible . "' WHERE id = '" . $new_id_cat . "'", __LINE__, __FILE__);
         return 'e_success';
     } else {
         return 'e_unexisting_cat';
     }
 }
示例#2
0
 function add($id_parent, $name, $description, $image)
 {
     global $Sql;
     if (array_key_exists($id_parent, $this->cache_var)) {
         $new_id_cat = parent::add($id_parent, $name);
         $Sql->query_inject("UPDATE " . PREFIX . "faq_cats SET description = '" . $description . "', image = '" . $image . "' WHERE id = '" . $new_id_cat . "'", __LINE__, __FILE__);
         return 'e_success';
     } else {
         return 'e_unexisting_cat';
     }
 }
示例#3
0
 function add($id_parent, $name, $description, $image, $new_auth, $mime_type, $activ)
 {
     global $Sql;
     if (array_key_exists($id_parent, $this->cache_var)) {
         if (empty($image)) {
             if ($mime_type == MEDIA_TYPE_MUSIC) {
                 $image = '../media/templates/images/audio.png';
             } elseif ($mime_type == MEDIA_TYPE_VIDEO) {
                 $image = '../media/templates/images/video.png';
             } else {
                 $image = '../media/media.png';
             }
         }
         $new_id_cat = parent::add($id_parent, $name);
         $Sql->query_inject("UPDATE " . PREFIX . "media_cat SET description = '" . $description . "', image = '" . $image . "', auth = '" . $new_auth . "', mime_type = '" . $mime_type . "', active = '" . $activ . "' WHERE id = '" . $new_id_cat . "'", __LINE__, __FILE__);
         return 'e_success';
     } else {
         return 'e_unexisting_cat';
     }
 }