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


PHP config::filename方法代码示例

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


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

 function displayalbum()
 {
     if (strlen($_POST[setposition])) {
         while (list($key, $val) = each($_POST)) {
             if (strstr($key, "chk_")) {
                 $key = str_replace("chk_", "", $key);
                 config::query("UPDATE " . $this->tblpfx . "album SET position='" . addslashes($val) . "' WHERE sno='{$key}'");
             }
         }
         echo "<script>window.location.href='?pg=" . $this->pg . "';</script>";
     }
     if (strlen($this->delid)) {
         //$ROWS=config::fetch_all_array("SELECT COUNT(*) FROM ".$this->tblpfx."photogallery WHERE albumid='".$this->delid."'",1);
         //if($ROWS[0]==0){
         config::query("DELETE FROM " . $this->tblpfx . "album WHERE sno='" . $this->delid . "'");
         config::query("DELETE FROM " . $this->tblpfx . "photogallery WHERE albumid='" . $this->delid . "'");
         unlink($this->path . $this->delid . "-" . $_GET[img]);
         echo "<script>window.location.href='?pg=" . $this->pg . "&success=3';</script>";
         //}else{
         //	echo "<script>alert('You can\'t delete this record.');window.location.href='?pg=".$this->pg."';</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 . "album 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']}'";
             $newfolder = $this->path;
             $newfolder .= config::filename($_POST[shall_albumname]) . "/";
             if (intval($this->upd) > 0) {
                 config::insertdb("album", "update", " sno='" . $this->upd . "'", $additional);
                 $success = 2;
                 if ($_POST[oldalbumname] != $_POST[shall_albumname]) {
                     $oldfolder = $this->path;
                     $oldfolder .= config::filename($_POST[oldalbumname]) . "/";
                     rename($oldfolder, $newfolder);
                 }
             } else {
                 $this->upd = config::insertdb("album", "insert", "", $additional);
                 $success = 1;
                 if (!is_dir($newfolder)) {
                     mkdir($newfolder);
                     chmod($newfolder, 0777);
                     mkdir($newfolder . "large/");
                     chmod($newfolder . "large/", 0777);
                 }
             }
             if (strlen($_FILES[filename][name])) {
                 $filename = $this->upd . "-" . $filename;
                 $image = new imageresize();
                 $image->load($_FILES["filename"]["tmp_name"]);
                 $image->resize(158, 104);
                 $image->save($this->path . $filename);
             }
             echo "<script>window.location.href='?pg=" . $this->pg . "&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 ($this->upd > 0) {
         $UPDATEROWS = config::fetch_all_array("SELECT * FROM " . $this->tblpfx . "album WHERE sno='" . $this->upd . "'", 1);
         //if(strlen($UPDATEROWS[imagename]))
         //	$imagename="<img src='".$this->path.$UPDATEROWS[sno]."-".$UPDATEROWS[imagename]."' height='50'>";
         $UPDATEROWS[tagdate] = config::datechange($UPDATEROWS[tagdate], "-", "-", "1");
         if ($UPDATEROWS[tagdate] == "00-00-0000") {
             $UPDATEROWS[tagdate] = "";
         }
     }
     $QUERY = config::fetch_all_array("SELECT *,(SELECT COUNT(*) FROM " . $this->tblpfx . "photogallery WHERE albumid=a.sno)as counter FROM " . $this->tblpfx . "album a ORDER BY position asc, sno desc");
     if (strlen($this->upd)) {
         $TAGQUERY = config::fetch_all_array("SELECT * FROM " . $this->tblpfx . "tags a ORDER BY title");
     }
     if (!strlen($UPDATEROWS[tagdate])) {
         $UPDATEROWS[tagdate] = date("d-m-Y");
     }
     $messagearray = array("", "Album Created<br>By default the last updated will appear first. To change the order please use Set Position", "Album Updated", "Album Deleted");
     $message = $_GET[success];
     $message = $messagearray[$message];
     include "template/photogallery.tpl";
 }
开发者ID:ranjansimon,项目名称:sacredspaces,代码行数:95,代码来源:photogallery.php


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