Exemplo n.º 1
0
 $Array["profilepic"]["img"] = $Article_Content["img"];
 $ImgArray = CwProfilePic($Array, $files, $Rand);
 $Article_Content["img"] = $ImgArray["file"];
 if ($_POST["img"] == $Article_Content["img"]) {
 } else {
     foreach ($files['profilepic'] as $file) {
         $ImgName = $file["name"];
     }
     $ImgSrc = $ImgArray["loc"];
     if (is_array($StructureImgSizes)) {
         $PostImages = Cw_Img_Resize($Array, $ImgSrc, $StructureImgSizes, $ImgName);
         $PostImages = serialize($PostImages);
     }
 }
 $Array["mediafile"]["code"] = $Article_Content["code"];
 $Article_Content["code"] = CwMediaFile($Array, $files, $Rand);
 /////////////////////////////////// SETS DEFAULT VARIABLE VALUES \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
 if ($Article_Url == "") {
     $Article_Url = $Article_Content["name"];
 }
 if ($Article_Content['code'] == "") {
     $Article_Content["code"] = $Article_Content["embedcode"];
 }
 if ($Article_Date == "") {
     $Article_Date = strtotime("now");
 }
 // REMOVES ALL AND ANY ILLEGAL CHARACTERS \\
 $Article_Content['name'] = CommaRemoval($Article_Content['name']);
 // SET THE CWFILE DOCUMENTS SETTINGS\\
 $CwFileTerm = $_POST["term"];
 $CwFileDuration = $_POST["duration"];
Exemplo n.º 2
0
     }
     $ImgSrc = $ImgArray["loc"];
     if (is_array($StructureImgSizes)) {
         $PostImages = Cw_Img_Resize($Array, $ImgSrc, $StructureImgSizes, $ImgName);
         $PostImages = serialize($PostImages);
     }
 }
 $Array["mediafile"]["code"] = $Article_Content["code"];
 $Article_Content["code"] = CwMediaFile($Array, $files, $Rand);
 if ($Ad_Img == "") {
     $Ad_Img = $_POST['img'];
 } else {
     $Ad_Img = $Ad_Img;
 }
 $Array["mediafile"]["code"] = $Article_Content["code"];
 $Ad_Other["file"] = CwMediaFile($Array, $files, $Rand);
 // PREPARES ARRAYS FOR DATABASE STORAGE \\
 $Ad_Other_Request = $Ad_Other;
 $Ad_Other = serialize($Ad_Other);
 $Ad_Info = serialize($Ad_Info);
 if ($Ad_Id == "") {
     //CREATES ROW FOR NEW ADVERTISEMENT \\
     mysql_query("INSERT INTO cw_ads(name, type, feat, location, adlimit, height, width, img, pb, other, info, rand, active) VALUES('{$Ad_Name}', '{$Ad_Type}', '{$Ad_Feat}', '{$Ad_Location}', '{$Ad_Limit}', '{$Ad_Height}', '{$Ad_Width}', '{$Ad_Img}', '{$Ad_Pb}', '{$Ad_Other}', '{$Ad_Info}', '{$Rand}', '{$Ad_Active}') ") or die(mysql_error());
     $query = "SELECT * FROM cw_ads WHERE rand='{$Rand}'";
     $result = mysql_query($query) or die(mysql_error());
     $row = mysql_fetch_array($result);
     $Ad_Id = $row['id'];
     $result = mysql_query("UPDATE cw_ads SET rand='' WHERE id='{$Ad_Id}'") or die(mysql_error());
     // PROCESS GALLERY IMAGE UPLOADS \\
     $Array["galleryupload"]["id"] = $Ad_Id;
     $Upload = $files["gallery"];