コード例 #1
0
ファイル: addpage.php プロジェクト: amoldclarion/ICRS
 }
 if (trim($_POST["by_whom"]) == "") {
     $strErrormessage .= "Please enter By whome.<br>";
     $intError = 0;
 }
 /*if($hldGlobal->fnCheckDescription($_POST["shot_description"]) == ""){
       $strErrormessage .= "Please enter shot description.<br>";
       $intError = 0;
   }
   if($hldGlobal->fnCheckDescription($_POST["long_description"]) == ""){
       $strErrormessage .= "Please enter long description.<br>";
       $intError = 0;
   }*/
 if (trim($_POST["page_title"]) != "") {
     if ($hldGlobal->fnCheckTitle(trim($_POST["page_title"]), trim($_POST["page_name"]))) {
         $strErrormessage .= "Title already present for " . $hldGlobal->fnGetPageName(trim($_POST["page_name"])) . " .<br>";
         $intError = 0;
     }
 }
 if (is_array($_FILES["img"]) && $_FILES["img"]["error"] == 0) {
     list($width, $height, $type, $attr) = getimagesize($_FILES['img']['tmp_name']);
     $arrPathInfo = pathinfo($_FILES["img"]["name"]);
     $strExtension = $arrPathInfo["extension"];
     list($usec, $sec) = explode(" ", microtime());
     $filename = $arrPathInfo["filename"] . $usec . $sec . "." . $arrPathInfo["extension"];
     $uploaddir = '../images/upload';
     $uploadfile = $uploaddir . "/" . $filename;
     if (is_dir($uploaddir)) {
         if (chmod($uploaddir, 0777)) {
             $intBool = chmod($uploaddir, 0777);
             if (!$intBool) {
コード例 #2
0
ファイル: managepage.php プロジェクト: amoldclarion/ICRS
                $hdlTpl->setVariable("status", "Active");
                //Assigns status
            } else {
                $intstatus = 1;
                $hdlTpl->setVariable("status", "In Active");
                //Assigns status
            }
            $hdlTpl->setVariable("returnurl", $hldGlobal->fnEncodeURL($_SERVER["REQUEST_URI"]));
            //Assigns encode url
            $hdlTpl->setVariable("id", $value["id"]);
            //Assigns id
            $hdlTpl->setVariable("activeflg", $intstatus);
            //Assigns flag
            $hdlTpl->setVariable("page_title", stripslashes(substr($value["page_title"], 0, 20) . "..."));
            //Assigns title
            $hdlTpl->setVariable("page_name", $hldGlobal->fnGetPageName($value["page_name"]));
            //Assigns description
            $hdlTpl->setVariable("isorder", $value["isorder"]);
            //Assigns order
            $hdlTpl->parse("managefiles");
        } else {
            $strPaging = $value;
        }
    }
    $hdlTpl->setVariable("paging", $strPaging);
    //Assigns Paging
    $hdlTpl->parse("StartManageFiles");
} else {
    $hdlTpl->setVariable("space", "&nbsp;");
    //Assigns space
    $hdlTpl->parse("NoManageFiles");