当前位置: 首页>>代码示例>>PHP>>正文


PHP config::fetch_all_array方法代码示例

本文整理汇总了PHP中config::fetch_all_array方法的典型用法代码示例。如果您正苦于以下问题:PHP config::fetch_all_array方法的具体用法?PHP config::fetch_all_array怎么用?PHP config::fetch_all_array使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在config的用法示例。


在下文中一共展示了config::fetch_all_array方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: maling

    function maling()
    {
        if (strstr($_POST[email], "@") || strstr($_POST[email], ".")) {
            $ids = str_replace("|", "','", str_replace("^", "", $this->lightbox));
            $QUERY = config::fetch_all_array("SELECT *,(SELECT albumname FROM " . $this->tblpfx . "album WHERE sno=p.albumid)as albumname FROM " . $this->tblpfx . "photogallery p WHERE sno in ('{$ids}') order by position");
            $mailcontent .= '
			<table width="500" border="0" cellspacing="0" cellpadding="5">
			<tr><td>Name</td><td>' . $_POST[name] . '</td></tr>
			<tr><td>Email</td><td>' . $_POST[email] . '</td></tr>
			<tr><td>Message</td><td>' . $_POST[message] . '<td></tr>
			</table>
			
			<table width="500" border="1" cellspacing="0" cellpadding="5">
			<tr><td colspan="2">LightBox Item</td></tr>';
            $gallerypath = $GLOBALS[baseurl] . "photos/gallery/";
            foreach ($QUERY as $ROWS) {
                $albumname = config::filename($ROWS[albumname]);
                $mailcontent .= '
				<tr><td width="185"><img src="' . $gallerypath . $albumname . '/' . $ROWS[sno] . "-" . $ROWS[imagename] . '" border="0" alt="' . $ROWS[photoname] . '"></td><td width="295" valign="top">' . $ROWS[albumname] . '<br/>' . $ROWS[shortdescription] . '</td></tr>';
            }
            $mailcontent .= '
			</table>';
            config::mailfunction("mehar@lopezdesign.com", $_POST[email], "New Light Box Enquiry", $mailcontent, "sunali@eastvillage.co.in");
            unset($_SESSION[lightboxsessid]);
            echo "<script>window.location.href='success.html';</script>";
        } else {
            echo "<script>alert('Please fill Complete form with proper foramt');window.location.href='lightbox.html';</script>";
        }
    }
开发者ID:ranjansimon,项目名称:sacredspaces,代码行数:29,代码来源:lightbox.php

示例2: photodisplay

 function photodisplay()
 {
     $ALBUMDETAIL = config::fetch_all_array("SELECT albumname,description FROM " . $this->tblpfx . "album where sno='" . $this->albumid . "'", 1);
     $albumfolder = config::filename($ALBUMDETAIL[albumname]);
     $MAINQUERY = "SELECT *,date_format(tagdate,'%Y')as year FROM " . $this->tblpfx . "photogallery a where albumid='" . $this->albumid . "' ORDER BY position asc, sno desc";
     $QUERY = config::fetch_all_array("{$MAINQUERY}");
     include "template/photogallery.tpl";
 }
开发者ID:ranjansimon,项目名称:sacredspaces,代码行数:8,代码来源:photogallery.php

示例3: citylist

    function citylist()
    {
        //echo "SELECT title FROM ".$this->tblpfx."tags where reff='".addslashes($_GET[country])."' AND typ='C' ORDER BY title<br>";
        $QUERY = config::fetch_all_array("SELECT title FROM " . $this->tblpfx . "tags where reff='" . addslashes($_GET[country]) . "' AND typ='C' ORDER BY title");
        echo '<select name="shall_city" style="width:250px;" id="req__Please select your city name">
		<option value="">Please Select</option>';
        foreach ($QUERY as $ROWS) {
            echo "\n\t\t\t\t<option value='{$ROWS['title']}'>{$ROWS['title']}</option>";
        }
        echo '</select>';
    }
开发者ID:ranjansimon,项目名称:sacredspaces,代码行数:11,代码来源:ajaxmanagement.php

示例4: displaycontact

 function displaycontact()
 {
     if (strlen($_POST[submit])) {
         $this->upd = config::insertdb("contactus", "update", " sno=1");
         $success = 1;
         echo "<script>window.location.href='?pg=" . $this->pg . "&success={$success}'</script>";
     }
     $messagearray = array("", "Content Uploaded", "Content Deleted");
     $message = $_GET[success];
     $message = $messagearray[$message];
     $ROWS = config::fetch_all_array("SELECT * FROM " . $this->tblpfx . "contactus", 1);
     include "template/contact.tpl";
 }
开发者ID:ranjansimon,项目名称:sacredspaces,代码行数:13,代码来源:contact.php

示例5: displayprints

 function displayprints()
 {
     if (strlen($_POST[submit])) {
         config::insertdb("prints", "update", " sno='1'", $additional);
         $success = 2;
         echo "<script>window.location.href='?pg=" . $this->pg . "&success={$success}'</script>";
     }
     $messagearray = array("", "Content Uploaded<br>By default the last updated will appear first. To change the order please use Set Position", "Content Updated", "Content Deleted");
     $message = $_GET[success];
     $message = $messagearray[$message];
     $ROWS = config::fetch_all_array("SELECT * FROM " . $this->tblpfx . "prints", 1);
     include "template/prints.tpl";
 }
开发者ID:ranjansimon,项目名称:sacredspaces,代码行数:13,代码来源:prints.php

示例6: memberlist

 function memberlist()
 {
     $QUERY = config::fetch_all_array("SELECT * FROM " . $this->tblpfx . "registration ORDER BY email");
     $QUERY2 = config::fetch_all_array("SELECT * FROM " . $this->tblpfx . "subscriber ORDER BY email");
     $total = count($QUERY) + count($QUERY2);
     echo "\n\t\t<div align='right'><input type='checkbox' name='checkall' value='1' onclick='checkallbox({$total},this);'> Check All</div>\n\t\t<div class='clearboth pad10' style='background-color:#cccccc;width:630px;'><b>Register User</b></div><br class='clearboth'>";
     $k = 0;
     foreach ($QUERY as $ROWS) {
         echo "\n\t\t\t<div class='selecteduser'><input type='checkbox' name='mailids[]' value='R{$ROWS[sno]}' id='chk_{$k}'>{$ROWS[email]}</div>";
         $k++;
     }
     echo "<div class='clearboth pad10' style='background-color:#cccccc;width:630px;'><b>Newsletter Subscriber</b></div><br class='clearboth'>";
     foreach ($QUERY2 as $ROWS2) {
         echo "\n\t\t\t<div class='selecteduser'><input type='checkbox' name='mailids[]' value='S{$ROWS2[sno]}' id='chk_{$k}'>{$ROWS2[email]}</div>";
         $k++;
     }
 }
开发者ID:ranjansimon,项目名称:sacredspaces,代码行数:17,代码来源:ajaxmanagement.php

示例7: homepagemanamgent

 function homepagemanamgent()
 {
     $ROWS = config::fetch_all_array("SELECT COUNT(*)as ctn,SUM((SELECT count(*) FROM " . $this->tblpfx . "photogallery WHERE albumid=a.sno))as totalgallery FROM " . $this->tblpfx . "album a WHERE typ='P' GROUP BY typ", 1);
     $ROWS2 = config::fetch_all_array("SELECT COUNT(*)as ctn,SUM((SELECT count(*) FROM " . $this->tblpfx . "photogallery WHERE albumid=a.sno))as totalgallery FROM " . $this->tblpfx . "album a WHERE typ='L' GROUP BY typ", 1);
     include "template/homepage.tpl";
 }
开发者ID:ranjansimon,项目名称:sacredspaces,代码行数:6,代码来源:homepage.php

示例8: photodisplay

 function photodisplay()
 {
     if (strlen($_POST[setposition])) {
         while (list($key, $val) = each($_POST)) {
             if (strstr($key, "chk_")) {
                 $key = str_replace("chk_", "", $key);
                 config::query("UPDATE " . $this->tblpfx . "photogallery SET position='" . addslashes($val) . "' WHERE sno='{$key}'");
             }
         }
         echo "<script>window.location.href='?pg=" . $this->pg . "&albumid=" . $this->albumid . "&albumtitle=" . $this->albumtitle . "&success=3';</script>";
     }
     if (strlen($this->delid)) {
         config::query("DELETE FROM " . $this->tblpfx . "photogallery WHERE sno='" . $this->delid . "'");
         unlink($this->path . $this->delid . "-" . $_GET[img]);
         echo "<script>window.location.href='?pg=" . $this->pg . "&albumid=" . $this->albumid . "&albumtitle=" . $this->albumtitle . "&success=3';</script>";
     }
     if (strlen($_POST[submit])) {
         if (strlen($_FILES[filename][name])) {
             $filename = $_FILES[filename][name];
             $additional .= ",imagename='" . addslashes($filename) . "'";
         }
         $CHKQRY = config::fetch_all_array("SELECT COUNT(*) FROM " . $this->tblpfx . "photogallery WHERE imagename='" . addslashes($filename) . "'", 1);
         if ($CHKQRY[0] == 0) {
             if ($_POST[tagdate_Month] < 10) {
                 $_POST[tagdate_Month] = "0" . ($_POST[tagdate_Month] + 1);
             }
             if ($_POST[tagdate_Day] < 10) {
                 $_POST[tagdate_Day] = "0" . $_POST[tagdate_Day];
             }
             $additional .= ",tagdate='{$_POST['tagdate_Year']}-{$_POST['tagdate_Month']}-{$_POST['tagdate_Day']}',albumid='" . addslashes($this->albumid) . "'";
             if (intval($this->upd) > 0) {
                 config::insertdb("photogallery", "update", " sno='" . $this->upd . "'", $additional);
                 $success = 2;
             } else {
                 $this->upd = config::insertdb("photogallery", "insert", "", $additional);
                 $success = 1;
             }
             if (strlen($_FILES[filename][name])) {
                 $filename = $this->upd . "-" . $filename;
                 //copy($_FILES[filename][tmp_name],$this->path."large/".$filename);
                 if (!is_dir($this->path)) {
                     mkdir($this->path);
                     chmod($this->path, 0777);
                     mkdir($this->path . "large/");
                     chmod($this->path . "large/", 0777);
                 }
                 list($width, $height) = getimagesize($_FILES["filename"]["tmp_name"]);
                 $newheight = 145;
                 $newwidth = $width / $height * $newheight;
                 if ($newwidth > 218) {
                     $newwidth = 218;
                 }
                 $image = new imageresize();
                 $image->load($_FILES["filename"]["tmp_name"]);
                 $image->resize($newwidth, 145);
                 $image->save($this->path . $filename);
                 ///large image
                 if ($height > 470) {
                     $newheight = 470;
                     $newwidth = $width / $height * $newheight;
                 } elseif ($width > 700) {
                     $newwidth = 700;
                     $newheight = $height / $width * $newwidth;
                 } else {
                     $newheight = $height;
                     $newwidth = $width;
                 }
                 $image->load($_FILES["filename"]["tmp_name"]);
                 $image->resize($newwidth, $newheight);
                 $image->save($this->path . "large/" . $filename);
             }
             echo "<script>window.location.href='?pg=" . $this->pg . "&albumid=" . $this->albumid . "&albumtitle=" . $this->albumtitle . "&success={$success}'</script>";
         } else {
             $errormessage = "<div class='error'>Duplicate Image not allowed</div>";
             while (list($key, $val) = each($_POST)) {
                 if (strstr($key, "shall_")) {
                     $key = str_replace("shall_", "", $key);
                     $UPDATEROWS[$key] = $val;
                 }
             }
         }
     }
     //if($UPDATEROWS[tagdate]=='' && $UPDATEROWS[city]=='' && $UPDATEROWS[religion]=='' && $UPDATEROWS[film]=='' && $UPDATEROWS[camera]=='' && $UPDATEROWS[lens]=='' && $UPDATEROWS[typeimg]=='')
     if ($this->upd > 0) {
         $UPDATEROWS = config::fetch_all_array("SELECT * FROM " . $this->tblpfx . "photogallery WHERE sno='" . $this->upd . "'", 1);
         $UPDATEROWS[tagdate] = config::datechange($UPDATEROWS[tagdate], "-", "-", "1");
         if ($UPDATEROWS[tagdate] == "00-00-0000") {
             $UPDATEROWS[tagdate] = "";
         }
         if (!strlen($UPDATEROWS[tagdate])) {
             $UPDATEROWS[tagdate] = date("d-m-Y");
         }
     } elseif (strlen($this->upd)) {
         $ALBUMROWS = config::fetch_all_array("SELECT tagdate,city,religion,typeimg,lens,film,camera FROM " . $this->tblpfx . "album WHERE sno='" . $this->albumid . "'", 1);
         $UPDATEROWS[tagdate] = config::datechange($ALBUMROWS[tagdate], "-", "-", "1");
         $UPDATEROWS[country] = $ALBUMROWS[country];
         $UPDATEROWS[city] = $ALBUMROWS[city];
         $UPDATEROWS[religion] = $ALBUMROWS[religion];
         $UPDATEROWS[film] = $ALBUMROWS[film];
         $UPDATEROWS[camera] = $ALBUMROWS[camera];
//.........这里部分代码省略.........
开发者ID:ranjansimon,项目名称:sacredspaces,代码行数:101,代码来源:photogallery.php

示例9: maillog

 function maillog()
 {
     $QUERY = config::fetch_all_array("SELECT * FROM " . $this->tblpfx . "newsletter_log WHERE mailid='{$_GET['id']}'");
     include "tmpl/popup.html";
 }
开发者ID:ranjansimon,项目名称:sacredspaces,代码行数:5,代码来源:popupmanagement.php

示例10: displaytags

 function displaytags()
 {
     $tagary = array("C" => "City", "R" => "Religion", "P" => "Camera", "L" => "Lens", "F" => "Film", "I" => "Type of Image");
     $fieldarray = array("C" => "city", "R" => "religion", "P" => "camera", "L" => "lens", "F" => "film", "I" => "typeimg");
     if (!strlen($this->typ)) {
         $this->typ = "C";
     }
     $fieldname = $fieldarray[$this->typ];
     if (strlen($this->delid)) {
         config::query("DELETE FROM " . $this->tblpfx . "tags WHERE sno='" . $this->delid . "' AND typ='" . $this->typ . "'");
         config::query("update " . $this->tblpfx . "album SET {$fieldname}='' WHERE {$fieldname}='" . stripslashes($_POST[oldtag]) . "'");
         config::query("update " . $this->tblpfx . "photogallery SET {$fieldname}='' WHERE {$fieldname}='" . stripslashes($_POST[oldtag]) . "'");
         config::query("update " . $this->tblpfx . "homegallery SET {$fieldname}='' WHERE {$fieldname}='" . stripslashes($_POST[oldtag]) . "'");
         echo "<script>window.location.href='?pg=" . $this->pg . "&typ=" . $this->typ . "&success=3';</script>";
     }
     if (strlen($_POST[submit])) {
         $additional = ",typ='" . $this->typ . "'";
         $CHKDUB = config::fetch_all_array("SELECT count(*) from " . $this->tblpfx . "tags WHERE sno!='" . $this->upd . "' AND title='" . addslashes($_POST["shall_title"]) . "' and typ='" . $this->typ . "'", 1);
         if ($CHKDUB[0] == 0) {
             if (intval($this->upd) > 0) {
                 config::insertdb("tags", "update", " sno='" . $this->upd . "'", $additional);
                 $success = 2;
             } else {
                 $this->upd = config::insertdb("tags", "insert", "", $additional);
                 $success = 1;
             }
             if ($_POST[oldtag] != $_POST[shall_title] && strlen($_POST[shall_title])) {
                 config::query("update " . $this->tblpfx . "album SET {$fieldname}='" . stripslashes($_POST[shall_title]) . "' WHERE {$fieldname}='" . stripslashes($_POST[oldtag]) . "' and {$fieldname}!=''");
                 config::query("update " . $this->tblpfx . "photogallery SET {$fieldname}='" . stripslashes($_POST[shall_title]) . "' WHERE {$fieldname}='" . stripslashes($_POST[oldtag]) . "' and {$fieldname}!=''");
                 config::query("update " . $this->tblpfx . "homegallery SET {$fieldname}='" . stripslashes($_POST[shall_title]) . "' WHERE {$fieldname}='" . stripslashes($_POST[oldtag]) . "' and {$fieldname}!=''");
             }
             if (strlen($_GET[red])) {
                 if (stristr($_GET[red], 'photo-')) {
                     $expld = explode("-", $_GET[red]);
                     $redval = "?pg={$expld['0']}&upd={$_GET[altid]}&albumid={$expld['1']}&albumtitle={$expld['2']}";
                 } else {
                     $redval = "?pg={$_GET[red]}&upd={$_GET[altid]}";
                 }
                 echo "<script>window.location.href='{$redval}'</script>";
             } else {
                 echo "<script>window.location.href='?pg=" . $this->pg . "&typ=" . $this->typ . "&success={$success}'</script>";
             }
         } else {
             echo "<script>alert('Duplicate Entry not allowed.');</script>";
             $UPDATEROWS[title] = $_POST[shall_title];
             $UPDATEROWS[reff] = $_POST[shall_reff];
         }
     }
     if ($this->upd > 0) {
         $UPDATEROWS = config::fetch_all_array("SELECT * FROM " . $this->tblpfx . "tags WHERE sno='" . $this->upd . "' AND typ='" . $this->typ . "'", 1);
     }
     $messagearray = array("", "Tag Created", "Tag Updated", "Tag Deleted");
     $message = $_GET[success];
     $message = $messagearray[$message];
     $QUERY = config::fetch_all_array("SELECT * FROM " . $this->tblpfx . "tags WHERE typ='" . $this->typ . "' ORDER BY title");
     if (strlen($this->upd)) {
         if (strlen($_GET[red])) {
             if (stristr($_GET[red], 'photo-')) {
                 $expld = explode("-", $_GET[red]);
                 $cancle = "?pg={$expld['0']}&upd={$_GET[altid]}&albumid={$expld['1']}&albumtitle={$expld['2']}";
             } else {
                 $cancle = "?pg={$_GET[red]}&upd={$_GET[altid]}";
             }
         } else {
             $cancle = "?pg=" . $this->pg . "&amp;typ=" . $this->typ;
         }
     }
     include "template/tags.tpl";
 }
开发者ID:ranjansimon,项目名称:sacredspaces,代码行数:69,代码来源:tagsmanagement.php

示例11: forgotpassword

 function forgotpassword()
 {
     if (strlen($_POST[fgtemailid])) {
         $ROWS = config::fetch_all_array("SELECT name,userid,pwd from " . $this->tblpfx . "user where email='" . addslashes($_POST[fgtemailid]) . "' limit 1", 1);
         if (strlen($ROWS[userid])) {
             $message = "Dear {$ROWS[name]},<br><br>\n\t\t\t\tYour SACRED SPACES Admin panel login details are as follow:<br><br>\n\t\t\t\tUser Name : <b>{$ROWS['userid']}</b><br>\n\t\t\t\tPassword : <b>{$ROWS['pwd']}</b><br><br><br>\n\t\t\t\tRegards,<br>\n\t\t\t\tSACRED SPACES Team";
             $result = config::mailfunction($_POST[fgtemailid], "support@sacredspaces.com", "SACRED SPACES Admin Login Details", $message);
             if ($result == 1) {
                 echo "<script>alert('Your login details has been sent to you on your registered email id.');window.location.href='?pg=fgt';</script>";
                 exit;
             } else {
                 echo "<script>alert('Due to technical reason your query is not submited. Please try again later.');window.location.href='?pg=fgt';</script>";
                 exit;
             }
         } else {
             echo "<script>alert('Invalid Email ID');</script>";
         }
     }
 }
开发者ID:ranjansimon,项目名称:sacredspaces,代码行数:19,代码来源:adminlogin.php

示例12: search

 function search()
 {
     $_GET[val] = str_replace('^', '/', $_GET[val]);
     if (strlen($_GET[tag])) {
         $tag = $_GET[val];
         $querystring = "&val=" . $_GET[val] . "&tag=" . $_GET[tag];
         /*if($_GET[tag]=="W"){
         			$condition="p.country='".addslashes($_GET[val])."'";
         		}
         		if($_GET[tag]=="C"){
         			if(strlen($condition))
         				$condition.=" AND ";
         			$condition.="p.city='".addslashes($_GET[val])."'";
         		}
         		
         		
         		
         		if($_GET[tag]=="R"){
         			if(strlen($condition))
         				$condition.=" AND ";
         			$condition.="p.religion='".addslashes($_GET[val])."'";
         		}
         		if($_GET[tag]=="P"){
         			if(strlen($condition))
         				$condition.=" AND ";
         			$condition.="p.camera='".addslashes($_GET[val])."'";
         		}
         		if($_GET[tag]=="L"){
         			if(strlen($condition))
         				$condition.=" AND ";
         			$condition.="p.lens='".addslashes($_GET[val])."'";
         		}
         		if($_GET[tag]=="F"){
         			if(strlen($condition))
         				$condition.=" AND ";
         			$condition.="p.film='".addslashes($_GET[val])."'";
         		}
         		if($_GET[tag]=="I"){
         			if(strlen($condition))
         				$condition.=" AND ";
         			$condition.="p.typeimg='".addslashes($_GET[val])."'";
         		}*/
         if ($_GET[tag] == "D") {
             //if(strlen($condition))
             //	$condition.=" AND ";
             $date = config::datechange(addslashes($_GET[val]), "-", "-", "1");
             $condition .= "(p.tagdate='{$date}' OR a.tagdate='{$date}')";
         } elseif ($_GET[tag] == "Y") {
             //if(strlen($condition))
             //$condition.=" AND ";
             $condition .= "(date_format(p.tagdate,'%Y')='" . addslashes($_GET[val]) . "' OR date_format(a.tagdate,'%Y')='" . addslashes($_GET[val]) . "')";
         } else {
             $condition .= " (p.typeimg='" . addslashes($_GET[val]) . "' OR p.film='" . addslashes($_GET[val]) . "' OR p.lens='" . addslashes($_GET[val]) . "' OR p.camera='" . addslashes($_GET[val]) . "' OR p.religion='" . addslashes($_GET[val]) . "' OR p.city='" . addslashes($_GET[val]) . "' OR a.typeimg='" . addslashes($_GET[val]) . "' OR a.film='" . addslashes($_GET[val]) . "' OR a.lens='" . addslashes($_GET[val]) . "' OR a.camera='" . addslashes($_GET[val]) . "' OR a.religion='" . addslashes($_GET[val]) . "' OR a.city='" . addslashes($_GET[val]) . "' OR p.country='" . addslashes($_GET[val]) . "' OR p.city='" . addslashes($_GET[val]) . "' OR a.city='" . addslashes($_GET[val]) . "' OR a.city='" . addslashes($_GET[val]) . "')";
         }
     } elseif (strlen($_REQUEST[searchitem]) >= 3) {
         $tag = $_REQUEST[searchitem];
         $querystring = "&searchitem=" . $_REQUEST[searchitem];
         $_REQUEST[searchitem] = strtolower($_REQUEST[searchitem]);
         $condition = "LCASE(p.photoname) LIKE '%" . addslashes($_REQUEST[searchitem]) . "%' OR LCASE(p.shortdescription) LIKE '%" . addslashes($_REQUEST[searchitem]) . "%' OR LCASE(p.typeimg) like '%" . addslashes($_REQUEST[searchitem]) . "%'  OR LCASE(p.film) like '%" . addslashes($_REQUEST[searchitem]) . "%' OR LCASE(p.lens) like '%" . addslashes($_REQUEST[searchitem]) . "%' OR LCASE(p.camera) like '%" . addslashes($_REQUEST[searchitem]) . "%' OR LCASE(p.religion) like '%" . addslashes($_REQUEST[searchitem]) . "%' OR LCASE(p.tagdate) like '%" . addslashes($_REQUEST[searchitem]) . "%' OR LCASE(p.city) like '%" . addslashes($_REQUEST[searchitem]) . "%' OR LCASE(p.country) like '%" . addslashes($_REQUEST[searchitem]) . "%' OR LCASE(a.albumname) like '%" . addslashes($_REQUEST[searchitem]) . "%' OR LCASE(a.shortdescription) LIKE '%" . addslashes($_REQUEST[searchitem]) . "%' OR LCASE(a.typeimg) like '%" . addslashes($_REQUEST[searchitem]) . "%'  OR LCASE(a.film) like '%" . addslashes($_REQUEST[searchitem]) . "%' OR LCASE(a.lens) like '%" . addslashes($_REQUEST[searchitem]) . "%' OR LCASE(a.camera) like '%" . addslashes($_REQUEST[searchitem]) . "%' OR LCASE(a.religion) like '%" . addslashes($_REQUEST[searchitem]) . "%' OR LCASE(a.tagdate) like '%" . addslashes($_REQUEST[searchitem]) . "%' OR LCASE(a.city) like '%" . addslashes($_REQUEST[searchitem]) . "%' OR LCASE(a.country) like '%" . addslashes($_REQUEST[searchitem]) . "%' OR LCASE(a.albumname) like '%" . addslashes($_REQUEST[searchitem]) . "%'";
     }
     if (strlen($condition)) {
         $no_record = 20;
         if (strlen($_REQUEST[perpage])) {
             $no_record = $_REQUEST[perpage];
         }
         if ($_REQUEST[slimit] > 0) {
             $startrecord = ($_REQUEST[slimit] - 1) * $no_record;
             //$qrylink.="&slimit=$_REQUEST[slimit]";
         } else {
             $startrecord = 0;
         }
         $MAINQUERY = "SELECT p.*,a.albumname FROM " . $this->tblpfx . "photogallery p," . $this->tblpfx . "album a WHERE a.sno=p.albumid and  ({$condition}) ORDER BY p.position asc, sno desc";
         $QUERY = config::fetch_all_array("{$MAINQUERY} limit {$startrecord}, {$no_record}");
         $pagepagging = config::paging($MAINQUERY, "index.php?pg=" . $this->pg . $querystring . "&", $no_record);
     }
     include "template/search.tpl";
 }
开发者ID:ranjansimon,项目名称:sacredspaces,代码行数:77,代码来源:pagemanamgent.php

示例13: showcase

 function showcase()
 {
     if (strlen($_POST[setposition])) {
         while (list($key, $val) = each($_POST)) {
             if (strstr($key, "chk_")) {
                 $key = str_replace("chk_", "", $key);
                 config::query("UPDATE " . $this->tblpfx . "showcase SET position='" . addslashes($val) . "' WHERE sno='{$key}'");
             }
         }
         echo "<script>window.location.href='?pg=" . $this->pg . "';</script>";
     }
     if (strlen($this->delid)) {
         config::query("DELETE FROM " . $this->tblpfx . "showcase WHERE sno='" . $this->delid . "'");
         unlink($this->path . $this->delid . "-" . $_GET[img]);
         echo "<script>window.location.href='?pg=" . $this->pg . "&success=3';</script>";
     }
     if (strlen($_POST[submit])) {
         if (strlen($_FILES[filename][name])) {
             $filename = $_FILES[filename][name];
             $additional .= ",filename='" . addslashes($filename) . "'";
         } elseif ($_POST[shall_typ] == "L") {
             if (!stristr($_POST[linkname], 'http')) {
                 $_POST[linkname] = "http://" . $_POST[linkname];
             }
             $additional .= ",filename='" . addslashes($_POST[linkname]) . "'";
         }
         if (intval($this->upd) > 0) {
             config::insertdb("showcase", "update", " sno='" . $this->upd . "'", $additional);
             $success = 2;
         } else {
             $this->upd = config::insertdb("showcase", "insert", "", $additional);
             $success = 1;
         }
         if (strlen($_FILES[filename][name])) {
             $filename = $this->upd . "-" . $filename;
             move_uploaded_file($_FILES["filename"]["tmp_name"], $this->path . $filename);
         }
         echo "<script>window.location.href='?pg=" . $this->pg . "&success={$success}'</script>";
     }
     $linkdisplay = " style='display:none;'";
     $filedisplay = "";
     if ($this->upd > 0) {
         $UPDATEROWS = config::fetch_all_array("SELECT * FROM " . $this->tblpfx . "showcase WHERE sno='" . $this->upd . "'", 1);
         if (strlen($UPDATEROWS[filename]) && $UPDATEROWS[typ] == "F") {
             $filename = "<a herf='" . $this->path . $UPDATEROWS[sno] . "-" . $UPDATEROWS[filename] . "' target='_blank'>{$UPDATEROWS[filename]}</a>";
             //$linkdisplay="";
         } else {
             $linkdisplay = "";
             $filedisplay = " style='display:none;'";
         }
     } else {
         $QUERY = config::fetch_all_array("SELECT * FROM " . $this->tblpfx . "showcase ORDER BY position asc, sno desc");
     }
     $messagearray = array("", "ShowCase Added<br>By default the last updated will appear first. To change the order please use Set Position", "ShowCase Updated", "ShowCase Deleted");
     $message = $_GET[success];
     $message = $messagearray[$message];
     include "template/showcase.tpl";
 }
开发者ID:ranjansimon,项目名称:sacredspaces,代码行数:58,代码来源:aboutus.php

示例14: filecreation

    function filecreation()
    {
        $QUERY = config::fetch_all_array("SELECT sno,name,imagename,country,city,date_format(tagdate,'%Y')as year FROM " . $this->tblpfx . "homegallery ORDER BY position asc,sno desc limit 0,5");
        foreach ($QUERY as $ROWS) {
            $tags = "";
            if (strlen($ROWS[city])) {
                $tags = "<a href='city-{$ROWS['city']}.html'>{$ROWS['city']}</a>";
            }
            if (strlen($ROWS[country])) {
                if (strlen($tags)) {
                    $tags .= ", ";
                }
                $tags .= "<a href='country-{$ROWS['country']}.html'>{$ROWS['country']}</a>. ";
            }
            if (strlen($ROWS[year]) && intval($ROWS[year]) > 0) {
                $tags .= "<a href='year-{$ROWS['year']}.html'>{$ROWS['year']}</a>.";
            }
            //$tags=config::tagdisplay($ROWS);
            $content .= '
			<img src="photos/slide/' . $ROWS[sno] . '-' . $ROWS[imagename] . '" title="<br><br><br><span class=title>' . $ROWS[name] . '</span><br /><span class=address>' . $tags . '</span>" border="0" >';
        }
        $fp = fopen("../slide/slide.txt", "w");
        fwrite($fp, $content);
        fclose($fp);
    }
开发者ID:ranjansimon,项目名称:sacredspaces,代码行数:25,代码来源:homegallery.php

示例15: usermanamgent

 function usermanamgent()
 {
     if (strlen($this->del)) {
         if ($this->del == 1) {
             echo "<script>alert('You are not able to delete this record');window.location.href='?pg=" . $this->pg . "';</script>";
             exit;
         } else {
             config::query("delete from " . $this->tblpfx . "user where sno='" . $this->del . "'");
             echo "<script>alert('Record has been deleted successfully');window.location.href='?pg=" . $this->pg . "';</script>";
             exit;
         }
     }
     if (!strlen($this->upd)) {
         $QUERY = config::fetch_all_array("select * from " . $this->tblpfx . "user");
     } else {
         if (strlen($this->submit)) {
             $rightsopt = $_POST[chk];
             while (list($key, $val) = each($rightsopt)) {
                 $rghtopt .= "#" . $val . "^";
             }
             $additional = ",rightoptions='{$rghtopt}'";
             if (intval($this->upd) == 0) {
                 config::insertdb("user", "insert", "", $additional);
                 echo "<script>alert('Record has been submitted successfully.');window.location.href='?pg=" . $this->pg . "';</script>";
             } else {
                 config::insertdb("user", "update", " sno='" . $this->upd . "'", $additional);
                 if ($this->upd == $_SESSION[adminid]) {
                     session_destroy();
                 }
                 echo "<script>alert('Record has been submitted successfully.');window.location.href='?pg=" . $this->pg . "';</script>";
             }
             exit;
         }
         if (intval($this->upd) > 0) {
             $ROWS = config::fetch_all_array("select * from " . $this->tblpfx . "user where sno='" . $this->upd . "'", 1);
         }
         ${"chk" . intval($ROWS[status])} = "checked";
         $RIGHTQRY = config::fetch_all_array("SELECT * FROM " . $this->tblpfx . "rights ORDER BY sno");
         $i = 0;
         $td = 0;
         foreach ($RIGHTQRY as $RIGHTROWS) {
             $checked = "";
             $td++;
             if (strstr($ROWS[rightoptions], "#" . $RIGHTROWS[sno] . "^")) {
                 $checked = "checked";
             }
             if ($td == 1) {
                 $RIGHTSMESSAGE .= "<tr>";
             }
             $RIGHTSMESSAGE .= "\n\t\t\t\t<td><input type='checkbox' name='chk[{$i}]' value='{$RIGHTROWS['sno']}' id='chk_{$i}' {$checked}> {$RIGHTROWS['rightname']}</td>";
             $i++;
             if ($td == 2) {
                 $RIGHTSMESSAGE .= "</tr>";
                 $td = 0;
             }
         }
         if ($td > 0) {
             $RIGHTSMESSAGE .= "<td></td></tr>";
         }
     }
     include "tmpl/adminuser.html";
 }
开发者ID:ranjansimon,项目名称:sacredspaces,代码行数:62,代码来源:adminuser.php


注:本文中的config::fetch_all_array方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。