Esempio n. 1
0
 echo 2;
 //video action edit
 if (count($_POST['video_gallery']) > 0) {
     $CONTENT_ID = intval(111);
     $CAT_ID = intval(57);
     $DIV_NAME = 'gallery';
     $sql = "SELECT ORDER_ID FROM trn_content_picture WHERE CONTENT_ID = " . $CONTENT_ID . " AND CAT_ID = " . $CAT_ID . " AND DIV_NAME =  '" . $DIV_NAME . "' ORDER BY ORDER_ID DESC LIMIT 0 , 1";
     $query = mysql_query($sql, $conn) or die($sql);
     $row = mysql_fetch_array($query);
     $index = $row['ORDER_ID'];
     $index++;
     foreach ($_POST['video_gallery'] as $k => $file) {
         $file = explode('|@|', $file);
         if ($file[0] == 'upload') {
             $IMG_TYPE = 2;
             $file[1] = move_video_file($file[1], 'gallery');
         } else {
             if ($file[0] == 'embed') {
                 $IMG_TYPE = 3;
             } else {
                 if ($file[0] == 'link') {
                     $IMG_TYPE = 4;
                 }
             }
         }
         unset($insert);
         $insert['CONTENT_ID'] = $CONTENT_ID;
         /*retrunID*/
         $insert['IMG_TYPE'] = $IMG_TYPE;
         $insert['IMG_PATH'] = "'" . $file[1] . "'";
         $insert['CAT_ID'] = $CAT_ID;
Esempio n. 2
0
     }
 }
 if (count($_POST['video_video']) > 0) {
     $CONTENT_ID = intval($conid);
     $CAT_ID = intval($CID);
     $DIV_NAME = 'video';
     $sql = "SELECT ORDER_ID FROM trn_content_picture WHERE CONTENT_ID = " . $CONTENT_ID . " AND CAT_ID = " . $CAT_ID . " AND DIV_NAME =  '" . $DIV_NAME . "' ORDER BY ORDER_ID DESC LIMIT 0 , 1";
     $query = mysql_query($sql, $conn) or die($sql);
     $row = mysql_fetch_array($query);
     $index = $row['ORDER_ID'];
     $index++;
     foreach ($_POST['video_video'] as $k => $file) {
         $file = explode('|@|', $file);
         if ($file[0] == 'upload') {
             $IMG_TYPE = 2;
             $file[1] = move_video_file($file[1], 'content_' . $CID);
         } else {
             if ($file[0] == 'embed') {
                 $IMG_TYPE = 3;
             } else {
                 if ($file[0] == 'link') {
                     $IMG_TYPE = 4;
                 }
             }
         }
         unset($insert);
         $insert['CONTENT_ID'] = $CONTENT_ID;
         /*retrunID*/
         $insert['IMG_TYPE'] = $IMG_TYPE;
         $insert['IMG_PATH'] = "'" . $file[1] . "'";
         $insert['CAT_ID'] = $CAT_ID;