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


PHP gcms::mktime2date方法代码示例

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


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

示例1: preg_replace

 $content[] = '<caption>' . preg_replace($patt2, $replace2, $lng['ALL_ITEMS']) . '</caption>';
 $content[] = '<thead>';
 $content[] = '<tr>';
 $content[] = '<th scope=col id=c0>{LNG_CREATED}</th>';
 $content[] = '<th scope=col id=c1 class=check-column><a class="checkall icon-uncheck"></a></th>';
 $content[] = '<th scope=col id=c2>{LNG_SENDER}</th>';
 $content[] = '<th scope=col id=c3>{LNG_DETAIL}</th>';
 $content[] = '</tr>';
 $content[] = '</thead>';
 $content[] = '<tbody>';
 // shoutbox
 $sql = "SELECT * FROM `" . DB_SHOUTBOX . "` ORDER BY `time` DESC LIMIT {$start}, {$list_per_page}";
 foreach ($db->customQuery($sql) as $item) {
     $id = $item['id'];
     $tr = '<tr id=L_' . $id . '>';
     $tr .= '<td headers="r' . $id . ' c0">' . gcms::mktime2date($item['time'], 'd M Y H:i:s') . '</td>';
     $tr .= '<td headers="r' . $id . ' c1" class=check-column><a id=check_' . $id . ' class=icon-uncheck></a></td>';
     $tr .= '<td headers="r' . $id . ' c2">' . $item['sender'] . '</td>';
     $tr .= '<td headers="r' . $id . ' c3">' . $item['text'] . '</td>';
     $tr .= '</tr>';
     $content[] = $tr;
 }
 $content[] = '</tbody>';
 $content[] = '<tfoot>';
 $content[] = '<tr>';
 $content[] = '<td headers=c0>&nbsp;</td>';
 $content[] = '<td headers=c1 class=check-column><a class="checkall icon-uncheck"></a></td>';
 $content[] = '<td headers=c2 colspan=2>&nbsp;</td>';
 $content[] = '</tr>';
 $content[] = '</tfoot>';
 $content[] = '</table>';
开发者ID:phannack,项目名称:GCMS,代码行数:31,代码来源:admin_history.php

示例2: elseif

             $u[] = "({$item['displayname']})";
         }
     } elseif ($item['displayname'] != '') {
         $u[] = $item['displayname'];
     } else {
         $u[] = '{LNG_UNNAME}';
     }
     $u = implode(' ', $u);
     $tr .= '<td headers="r' . $id . ' c4" class=mobile>' . $u . '</td>';
     $sex = in_array($item['sex'], array_keys($lng['SEX'])) ? $item['sex'] : 'u';
     $tr .= '<td headers="r' . $id . ' c5" class="center tablet"><span class=icon-sex-' . $sex . '></span></td>';
     $website = $item['website'] == '' ? '&nbsp;' : '<a href="http://' . $item['website'] . '" target=_blank>' . $item['website'] . '</a>';
     $tr .= '<td headers="r' . $id . ' c6" class="website tablet">' . $website . '</td>';
     $tr .= '<td headers="r' . $id . ' c7" class="date tablet">' . gcms::mktime2date($item['create_date'], 'd M Y') . '</td>';
     if (trim($item['activatecode']) == '') {
         $tr .= '<td headers="r' . $id . ' c8" class="date tablet">' . gcms::mktime2date($item['lastvisited'], 'd M Y H:i') . ' <span class=visited>(' . $item['visited'] . ')</span></td>';
     } else {
         $tr .= '<td headers="r' . $id . ' c8" class="noactivate center tablet">{LNG_NOACTIVATE}</td>';
     }
     $tr .= '<td headers="r' . $id . ' c9" class=menu><a href="{URLQUERY?id=' . $id . '&module=editprofile&src=member&spage=' . $page . '}" title="{LNG_MEMBER_EDIT_TITLE}" class=icon-edit>&nbsp;</a></td>';
     $tr .= '</tr>';
     $content[] = $tr;
 }
 $content[] = '</tbody>';
 $content[] = '<tfoot>';
 $content[] = '<tr>';
 $content[] = '<td headers=c0 colspan=2>&nbsp;</td>';
 $content[] = '<td headers=c2 class=check-column><a class="checkall icon-uncheck"></a></td>';
 $content[] = '<td headers=c3 colspan=8></td>';
 $content[] = '</tr>';
 $content[] = '</tfoot>';
开发者ID:goragod,项目名称:php-framework-benchmark,代码行数:31,代码来源:member.php

示例3: implode

                $i++;
                $row = '<article class=r>';
                $row .= '<div class=detail>' . $picture . gcms::showDetail($item['detail'], true) . '</div>';
                $row .= '<footer>';
                $row .= '<p><strong>{LNG_COMMENT_NO}#' . $i . '</strong></p>';
                $row .= '<p><strong>{LNG_BY}</strong>: ' . (empty($item['displayname']) ? $item['email'] : $item['displayname']) . '</p>';
                $row .= '<p><strong>{LNG_POSTED}</strong>: ' . gcms::mktime2date($item['last_update']) . '</p>';
                $row .= '<p><strong>{LNG_IP}</strong>: ' . gcms::showip($item['ip']) . '</p>';
                $row .= '</footer>';
                $row .= '</article>';
                $comments[] = $row;
            }
            $title = $index['topic'];
            if ($index['picture'] != '' && is_file($imagedir . $index['picture'])) {
                $picture = '<p class=img><img src="' . $imageurl . $index['picture'] . '" alt=""></p>';
            } else {
                $picture = '';
            }
            $content = '<article>';
            $content .= '<header><h1>' . $index['topic'] . '</h1></header>';
            $content .= '<div class=detail>' . $picture . gcms::showDetail($index['detail'], true) . '</div>';
            $content .= '<footer>';
            $content .= '<p><strong>{LNG_BY}</strong> : ' . ($index['displayname'] == '' ? $index['email'] : $index['displayname']) . '</p>';
            $content .= '<p><strong>{LNG_POSTED}</strong>: ' . gcms::mktime2date($index['create_date']) . '</p>';
            $content .= '<p><strong>{LNG_URL}</strong> : ' . gcms::getURL($modules['module'], '', 0, 0, "wbid={$index['id']}") . '</p>';
            $content .= '</footer>';
            $content .= '</article>';
            $content .= implode("\n", $comments);
        }
    }
}
开发者ID:phannack,项目名称:GCMS,代码行数:31,代码来源:print.php

示例4: foreach

 $content[] = '</tr>';
 $content[] = '</thead>';
 $content[] = '<tbody>';
 // query โมดูลที่ติดตั้ง
 $sql = "SELECT I.`id`,D.`topic`,I.`last_update`,I.`visited`,I.`language`,I.`published`";
 $sql .= ",M.`id` AS `module_id`,M.`owner`,M.`module`";
 $sql .= " {$sql1} {$where} ORDER BY M.`owner`,M.`module`,I.`language` LIMIT {$start}, {$list_per_page}";
 foreach ($db->customQuery($sql) as $i => $item) {
     $id = $item['id'];
     $content[] = '<tr id=M_' . $id . '>';
     $content[] = '<th headers=c0 id=r' . $id . ' scope=row class=topic><a href="{WEBURL}/index.php?module=' . $item['module'] . '" title="{LNG_PREVIEW}">' . $item['topic'] . '</a></th>';
     $content[] = '<td headers="r' . $id . ' c1" class="menu mobile"><a id=published_index_' . $id . ' class="icon-published' . $item['published'] . '" title="' . $lng['LNG_PUBLISHEDS'][$item['published']] . '"></a></td>';
     $content[] = '<td headers="r' . $id . ' c2" class=menu>' . ($item['language'] == '' ? '&nbsp;' : '<img src=' . WEB_URL . '/datas/language/' . $item['language'] . '.gif alt="' . $item['language'] . '">') . '</td>';
     $content[] = '<td headers="r' . $id . ' c3">' . $item['module'] . '</td>';
     $content[] = '<td headers="r' . $id . ' c4" class=tablet>' . $item['owner'] . '</td>';
     $content[] = '<td headers="r' . $id . ' c5" class="date mobile">' . gcms::mktime2date($item['last_update'], 'd M Y H:i') . ' {LNG_TIME_DIGIT}</td>';
     $content[] = '<td headers="r' . $id . ' c6" class="visited mobile">' . $item['visited'] . '</td>';
     $content[] = '<td headers="r' . $id . ' c7" class=menu><a class=icon-edit href="{URLQUERY?module=index-write&src=index-insmod&spage=' . $page . '&id=' . $id . '}" title="{LNG_EDIT}"></a></td>';
     $content[] = '<td headers="r' . $id . ' c7" class=menu><a class=icon-delete href="{URLQUERY}" title="{LNG_DELETE}" id=delete_module_' . $id . '></a></td>';
     $content[] = '</tr>';
 }
 $content[] = '</tbody>';
 $content[] = '</table>';
 // แบ่งหน้า
 $url = '<a href="{URLQUERY?page=%d}" title="{LNG_DISPLAY_PAGE} %d">%d</a>';
 $content[] = '<div class=splitpage>' . gcms::pagination($totalpage, $page, $url) . '</div>';
 $content[] = '</section>';
 $content[] = '<script>';
 $content[] = '$G(window).Ready(function(){';
 $content[] = "inintTR('insmod', /M_[0-9]+/);";
 $content[] = "inintIndexPages('insmod', false);";
开发者ID:phannack,项目名称:GCMS,代码行数:31,代码来源:admin_insmod.php

示例5: foreach

 foreach ($datas as $i => $item) {
     if ($i > 0 && $i % $match[2] == 0) {
         $widget[] = '</div><div class="row ' . $styles . 'view">';
     }
     $bg = $bg == 'bg1' ? 'bg2' : 'bg1';
     $replace = array();
     $replace[] = "{$bg} background" . rand(0, 5);
     if ($config['module_url'] == '1') {
         $replace[] = gcms::getURL($index['module'], $item['alias']);
     } else {
         $replace[] = gcms::getURL($index['module'], '', 0, $item['id']);
     }
     $replace[] = $item['topic'];
     $replace[] = $item['description'];
     $replace[] = gcms::ser2Str($item, 'category');
     $replace[] = gcms::mktime2date($item['create_date'], 'd M Y');
     $replace[] = $item['member_id'];
     $replace[] = $item['displayname'] == '' ? $item['email'] : $item['displayname'];
     $replace[] = $item['status'];
     $replace[] = number_format($item['comments']);
     $replace[] = number_format($item['visited']);
     if ($item['picture'] != '' && is_file(DATA_PATH . "document/{$item['picture']}")) {
         $replace[] = DATA_URL . "document/{$item['picture']}";
     } else {
         $replace[] = WEB_URL . "/{$index['default_icon']}";
     }
     if ($item['create_date'] > $valid_date && $item['comment_date'] == 0) {
         $replace[] = 'new';
     } elseif ($item['last_update'] > $valid_date || $item['comment_date'] > $valid_date) {
         $replace[] = 'update';
     } else {
开发者ID:phannack,项目名称:GCMS,代码行数:31,代码来源:getnews.php

示例6: rawurlencode

                 $input = !$error ? 'email_subject' : $input;
                 $error = !$error ? 'TOPIC_EMPTY' : $error;
             } else {
                 $ret['ret_email_subject'] = '';
             }
         }
         if (!$error) {
             $save['last_update'] = $mmktime;
             if ($id == 0) {
                 // ใหม่
                 $id = $db->add(DB_EMAIL_TEMPLATE, $save);
             } else {
                 // แก้ไข
                 $db->edit(DB_EMAIL_TEMPLATE, $id, $save);
             }
             $ret['lastupdate'] = gcms::mktime2date($mmktime);
             if (isset($_POST['email_copy_to'])) {
                 $ret['email_copy_to'] = rawurlencode($save['copy_to']);
             }
             $ret['email_id'] = $id;
             $ret['error'] = 'SAVE_COMPLETE';
             $ret['location'] = gcms::retURL(WEB_URL . '/admin/index.php', array('module' => 'mailtemplate'));
         } else {
             // คืนค่า input ตัวแรกที่ error
             if ($input) {
                 $ret['input'] = $input;
             }
             $ret['error'] = $error;
         }
     }
 }
开发者ID:goragod,项目名称:php-framework-benchmark,代码行数:31,代码来源:mailwrite_save.php

示例7: foreach

 $config['member_status'][$item['status']] = $lng['LNG_GUEST'];
 // query
 $sql = "SELECT D.*,U.`fname`,U.`lname`,U.`email`,U.`status` FROM `" . DB_EDOCUMENT_DOWNLOAD . "` AS D";
 $sql .= " LEFT JOIN `" . DB_USER . "` AS U ON U.`id`=D.`member_id`";
 $sql .= " {$where} ORDER BY D.`last_update` DESC LIMIT {$start},{$list_per_page}";
 foreach ($db->customQuery($sql) as $item) {
     $tr = '<tr id=M_' . $item['id'] . '>';
     if ($item['member_id'] == 0) {
         $sender = '-';
     } else {
         $sender = trim("{$item['fname']} {$item['lname']}");
         $sender = $sender == '' ? $item['email'] : $sender;
     }
     $tr .= '<th headers=c0 id=r' . $id . ' scope=row class=topic><a href="index.php?id=' . $item['sender_id'] . '&module=editprofile&src=edocument-setup" class="cuttext status' . $item['status'] . '">' . $sender . '</a></th>';
     $tr .= '<td headers="r' . $id . ' c1" class="center status' . $item['status'] . ' mobile">' . $config['member_status'][$item['status']] . '</td>';
     $tr .= '<td headers="r' . $id . ' c2" class=date>' . gcms::mktime2date($item['last_update']) . '</td>';
     $tr .= '<td headers="r' . $id . ' c3" class="visited mobile">' . $item['downloads'] . '</td>';
     $tr .= '</tr>';
     $content[] = $tr;
 }
 $content[] = '</tbody>';
 $content[] = '</table>';
 // แบ่งหน้า
 $maxlink = 9;
 $url = '<a href="{URLQUERY?module=edocument-report&page=%d}" title="{LNG_DISPLAY_PAGE} %d">%d</a>';
 if ($totalpage > $maxlink) {
     $start = $page - floor($maxlink / 2);
     if ($start < 1) {
         $start = 1;
     } elseif ($start + $maxlink > $totalpage) {
         $start = $totalpage - $maxlink + 1;
开发者ID:phannack,项目名称:GCMS,代码行数:31,代码来源:admin_report.php

示例8:

             $tr .= '<td headers="r' . $id . ' c2" class="menu mobile"><img src="' . DATA_URL . 'document/' . $item['picture'] . '" title="' . $lng['LNG_THUMBNAILS'][1] . '" width=22 height=22 alt=thumbnail>';
         } else {
             $tr .= '<td headers="r' . $id . ' c2" class="menu mobile"><span class=icon-thumbnail title="' . $lng['LNG_THUMBNAILS'][0] . '"></span>';
         }
         $tr .= '<td headers="r' . $id . ' c2" class="menu mobile"><span class="icon-reply reply' . $item['can_reply'] . '" title="' . $lng['LNG_CAN_REPLIES'][$item['can_reply']] . '"></span></td>';
         $tr .= '<td headers="r' . $id . ' c2" class="menu mobile"><span class="icon-published' . $item['published'] . '" title="' . $lng['LNG_PUBLISHEDS'][$item['published']] . '"></span></td>';
         $tr .= '<td headers="r' . $id . ' c2" class="menu mobile"><span class="icon-widgets reply' . (preg_match('/news=1/', $item['show_news']) ? 1 : 0) . '"></span></td>';
         $tr .= '<td headers="r' . $id . ' c5" class=mobile>';
         if (isset($categories[$item['category_id']])) {
             $category = $categories[$item['category_id']];
             $tr .= '<a href="{URLQUERY?cat=' . $item['category_id'] . '}" title="{LNG_SELECT_ITEM}">' . gcms::cutstring($category, 10) . '</a>';
         }
         $tr .= '</td>';
         $tr .= '<td headers="r' . $id . ' c6" class="username tablet"><a href="index.php?module=editprofile&amp;id=' . $item['member_id'] . '" class=status' . $item['status'] . ' title="{LNG_MEMBER_PROFILE}">' . $item['sender'] . '</a></td>';
         $tr .= '<td headers="r' . $id . ' c7" class="date tablet">' . gcms::mktime2date($item['create_date'], 'd M Y H:i') . '</td>';
         $tr .= '<td headers="r' . $id . ' c8" class="date tablet">' . gcms::mktime2date($item['last_update'], 'd M Y H:i') . '</td>';
         $tr .= '<td headers="r' . $id . ' c9" class="visited tablet">' . $item['visited'] . '</td>';
         $tr .= '<td headers="r' . $id . ' c10" class=menu><a href="{URLQUERY?module=document-write&src=document-setup&spage=' . $page . '&qid=' . $item['id'] . '}" title="{LNG_EDIT}" class=icon-edit></a></td>';
         $tr .= '</tr>';
         $content[] = $tr;
     }
 }
 $content[] = '</tbody>';
 $content[] = '<tfoot>';
 $content[] = '<tr>';
 $content[] = '<td headers=c0>&nbsp;</td>';
 $content[] = '<td headers=c1 class=check-column><a class="checkall icon-uncheck"></a></td>';
 $content[] = '<td headers=c2 colspan=10></td>';
 $content[] = '</tr>';
 $content[] = '</tfoot>';
 $content[] = '</table>';
开发者ID:phannack,项目名称:GCMS,代码行数:31,代码来源:admin_setup.php

示例9: empty

     $content[] = '<option value=' . $i . $sel . '>' . $item . '</option>';
 }
 $content[] = '</select></span>';
 $content[] = '<div class=comment>{LNG_PUBLISHED_SETTING}</div>';
 $content[] = '</div>';
 $content[] = '</fieldset>';
 // submit
 $content[] = '<fieldset class=submit>';
 $content[] = '<input type=submit class="button large save" value="{LNG_SAVE}">';
 $content[] = '<input type=button id=write_open class="button large preview" value="{LNG_PREVIEW}">';
 $content[] = gcms::get2Input($_GET);
 $content[] = '<input type=hidden id=write_id name=write_id value=' . (int) $index['id'] . '>';
 $content[] = '<input type=hidden name=module_id value=' . (int) $index['module_id'] . '>';
 $content[] = '<input type=hidden id=write_tab name=write_tab>';
 $content[] = '</fieldset>';
 $lastupdate = empty($index['last_update']) ? '-' : gcms::mktime2date($index['last_update']);
 $content[] = '<div class=lastupdate><span class=comment>{LNG_WRITE_COMMENT}</span>{LNG_LAST_UPDATE}<span id=lastupdate>' . $lastupdate . '</span></div>';
 $content[] = '</form>';
 $content[] = '</section>';
 $content[] = '<script>';
 $_SESSION['CKEDITOR'] = $_SESSION['login']['id'];
 foreach ($config['languages'] as $item) {
     $content[] = 'CKEDITOR.replace("write_detail_' . $item . '", {';
     $content[] = 'toolbar:"Document",';
     $content[] = 'language:"' . LANGUAGE . '",';
     $content[] = 'height:300,';
     if (is_dir(ROOT_PATH . 'ckfinder')) {
         $content[] = 'filebrowserBrowseUrl:"' . WEB_URL . '/ckfinder/ckfinder.html",';
         $content[] = 'filebrowserImageBrowseUrl:"' . WEB_URL . '/ckfinder/ckfinder.html?Type=Images",';
         $content[] = 'filebrowserFlashBrowseUrl:"' . WEB_URL . '/ckfinder/ckfinder.html?Type=Flash",';
         $content[] = 'filebrowserUploadUrl:"' . WEB_URL . '/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Files",';
开发者ID:phannack,项目名称:GCMS,代码行数:31,代码来源:admin_write.php

示例10: elseif

        } elseif ($result['displayname'] != '') {
            $u[] = $result['displayname'];
        } else {
            $u[] = $result['email'];
        }
        $replace[] = implode(' ', $u);
        if (is_file(ROOT_PATH . 'modules/pm/send.php')) {
            $replace[] = '<a class=icon-email-sent title="{LNG_PM_SEND_TITLE}" href="index.php?module=pm-send&amp;to=' . $result['id'] . '">&nbsp;</a>';
        } else {
            $replace[] = '<a class=icon-email-sent title="{LNG_MAIL_TO}" href="index.php?module=sendmail&amp;to=' . $result['id'] . '">&nbsp;</a>';
        }
        $replace[] = in_array($result['sex'], array_keys($lng['SEX'])) ? $result['sex'] : 'u';
        $replace[] = gcms::mktime2date($result['create_date'], 'd M Y');
        $replace[] = $result['website'] == '' ? '-' : "<a href=\"http://{$result['website']}\" target=_blank>{$result['website']}</a>";
        $replace[] = number_format($result['visited']);
        $replace[] = $result['fb'] == 1 ? 'icon-facebook' : '';
        $replace[] = gcms::mktime2date($result['lastvisited'], 'd M Y');
        $replace[] = $result['post'];
        $replace[] = $result['reply'];
        $replace[] = $config['member_status'][(int) $result['status']];
        $replace[] = $result['point'];
        $replace[] = OLD_PHP ? '$lng[\'$1\']' : 'gcms::getLng';
        $content = gcms::pregReplace($patt, $replace, gcms::loadtemplate('member', 'member', 'view'));
    } else {
        $title = $lng['LNG_ID_NOT_FOUND'];
        $content = '<div class=error>' . $title . '</div>';
    }
} else {
    $title = $lng['LNG_DATA_NOT_FOUND'];
    $content = '<div class=error>' . $title . '</div>';
}
开发者ID:phannack,项目名称:GCMS,代码行数:31,代码来源:main.php

示例11: foreach

 foreach ($lng['LNG_PUBLISHEDS'] as $i => $item) {
     $sel = $index['published'] == $i ? ' selected' : '';
     $content[] = '<option value=' . $i . $sel . '>' . $item . '</option>';
 }
 $content[] = '</select></span>';
 $content[] = '<div class=comment>{LNG_PUBLISHED_SETTING}</div>';
 $content[] = '</div>';
 $content[] = '</fieldset>';
 // submit
 $content[] = '<fieldset class=submit>';
 $content[] = '<input type=submit class="button large save" value="{LNG_SAVE}">';
 $content[] = '<input type=button id=write_open class="button large preview" value="{LNG_PREVIEW}">';
 $content[] = '<input type=hidden id=write_id name=write_id value=' . $index['id'] . '>';
 $content[] = '<input type=hidden id=write_owner name=write_owner value=' . $index['owner'] . '>';
 $content[] = '</fieldset>';
 $lastupdate = $index['last_update'] == '' ? '-' : gcms::mktime2date($index['last_update']);
 $content[] = '<div class=lastupdate><span class=comment>{LNG_WRITE_COMMENT}</span>{LNG_LAST_UPDATE}<span id=lastupdate>' . $lastupdate . '</span></div>';
 $content[] = '</form>';
 $content[] = '</section>';
 $content[] = '<script>';
 $content[] = '$G(window).Ready(function(){';
 $_SESSION['CKEDITOR'] = $_SESSION['login']['id'];
 $content[] = 'CKEDITOR.replace("write_detail", {';
 $content[] = 'toolbar:"Document",';
 $content[] = 'language:"' . LANGUAGE . '",';
 $content[] = 'height:300,';
 if (is_dir(ROOT_PATH . 'ckfinder')) {
     $content[] = 'filebrowserBrowseUrl:"' . WEB_URL . '/ckfinder/ckfinder.html",';
     $content[] = 'filebrowserImageBrowseUrl:"' . WEB_URL . '/ckfinder/ckfinder.html?Type=Images",';
     $content[] = 'filebrowserFlashBrowseUrl:"' . WEB_URL . '/ckfinder/ckfinder.html?Type=Flash",';
     $content[] = 'filebrowserUploadUrl:"' . WEB_URL . '/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Files",';
开发者ID:phannack,项目名称:GCMS,代码行数:31,代码来源:admin_write.php

示例12: sendMail

 /**
  * ฟังก์ชั่นส่งเมล์จากแม่แบบจดหมาย
  *
  * @global resource $db database resource
  * @global array $config ตัวแปรเก็บการตั้งค่าของ GCMS
  * @global int $mmktime เวลาปัจจุบัน (mktime)
  * @param int $id ID ของจดหมายที่ต้องการส่ง
  * @param string $module ชื่อโมดูลของจดหมายที่ต้องการส่ง
  * @param array $datas ข้อมูลที่จะถูกแทนที่ลงในจดหมาย ในรูป 'ตัวแปร'=>'ข้อความ'
  * @param string $to ที่อยู่อีเมล์ผู้รับ  คั่นแต่ละรายชื่อด้วย ,
  * @return string สำเร็จคืนค่าว่าง ไม่สำเร็จ คืนค่าข้อความผิดพลาด
  */
 public static function sendMail($id, $module, $datas, $to)
 {
     global $db, $config, $mmktime;
     $sql = "SELECT * FROM `" . DB_EMAIL_TEMPLATE . "`";
     $sql .= " WHERE `module`='{$module}' AND `email_id`='{$id}' AND `language` IN ('" . LANGUAGE . "','th')";
     $sql .= " LIMIT 1";
     $email = $db->customQuery($sql);
     if (sizeof($email) == 0) {
         return 'Error : email template not found.';
     } else {
         $email = $email[0];
         // ข้อความในอีเมล์
         $replace = array();
         $replace['/%WEBTITLE%/'] = strip_tags($config['web_title']);
         $replace['/%WEBURL%/'] = WEB_URL;
         $replace['/%EMAIL%/'] = $to;
         $replace['/%ADMINEMAIL%/'] = empty($email['from_email']) ? $config['noreply_email'] : $email['from_email'];
         $replace['/%TIME%/'] = gcms::mktime2date($mmktime);
         $replace = array_merge($replace, $datas);
         $patt = array_keys($replace);
         $replace = array_values($replace);
         $msg = preg_replace($patt, $replace, $email['detail']);
         $subject = preg_replace($patt, $replace, $email['subject']);
         // ส่งอีเมล์
         return gcms::customMail($to . (!empty($email['copy_to']) ? ",{$email['copy_to']}" : ''), $email['from_email'], $subject, $msg);
     }
 }
开发者ID:phannack,项目名称:GCMS,代码行数:39,代码来源:class.gcms.php

示例13:

     $content[] = '<div class=comment id=result_email_language>{LNG_EMAIL_LANGUAGE_COMMENT}</div>';
     $content[] = '</div>';
 }
 // detail
 $content[] = '<div class=item>';
 $content[] = '<label for=email_detail>{LNG_DETAIL} </label>';
 $content[] = '<div><textarea name=email_detail id=email_detail>' . gcms::detail2TXT($email, 'detail') . '</textarea></div>';
 $content[] = '</div>';
 $content[] = '</fieldset>';
 // submit
 $content[] = '<fieldset class=submit>';
 $content[] = '<input type=submit class="button large save" value="{LNG_SAVE}">';
 $content[] = gcms::get2Input($_GET);
 $content[] = '<input type=hidden id=email_id name=email_id value=' . $email['id'] . '>';
 $content[] = '</fieldset>';
 $lastupdate = $email['last_update'] == '' ? '-' : gcms::mktime2date($email['last_update']);
 $content[] = '<div class=lastupdate><span class=comment>{LNG_WRITE_COMMENT}</span>{LNG_LAST_UPDATE}<span id=lastupdate>' . $lastupdate . '</span></div>';
 $content[] = '</form>';
 $content[] = '</section>';
 $content[] = '<script>';
 $content[] = '$G(window).Ready(function(){';
 $_SESSION['CKEDITOR'] = $_SESSION['login']['id'];
 $content[] = 'CKEDITOR.replace("email_detail", {';
 $content[] = 'toolbar:"Document",';
 $content[] = 'language:"' . LANGUAGE . '",';
 $content[] = 'contentsCss:"",';
 $content[] = 'height:300,';
 if (is_dir(ROOT_PATH . 'ckfinder')) {
     $content[] = 'filebrowserBrowseUrl:"' . WEB_URL . '/ckfinder/ckfinder.html",';
     $content[] = 'filebrowserImageBrowseUrl:"' . WEB_URL . '/ckfinder/ckfinder.html?Type=Images",';
     $content[] = 'filebrowserFlashBrowseUrl:"' . WEB_URL . '/ckfinder/ckfinder.html?Type=Flash",';
开发者ID:goragod,项目名称:php-framework-benchmark,代码行数:31,代码来源:mailwrite.php

示例14: empty

 $replace[] = $canDelete ? '\\1' : 'hidden';
 $replace[] = $canReply ? '\\1' : 'hidden';
 $replace[] = gcms::HighlightSearch(gcms::showDetail($index['detail'], $canview, false), $search);
 $replace[] = LANGUAGE;
 $replace[] = (int) $index['member_id'];
 $replace[] = empty($index['displayname']) ? $index['email'] : $index['displayname'];
 if (is_file(DATA_PATH . "document/{$index['picture']}")) {
     // รูปภาพของบทความ
     $image_src = DATA_URL . "document/{$index['picture']}";
     $replace[] = '<figure><img src="' . $image_src . '" alt="' . $index['topic'] . '"></figure>';
 } else {
     $image_src = WEB_URL . "/{$index['default_icon']}";
     $replace[] = '';
 }
 $replace[] = $index['status'];
 $replace[] = gcms::mktime2date($index['create_date']);
 $replace[] = date(DATE_ISO8601, $index['create_date']);
 $replace[] = $category;
 $replace[] = number_format($index['visited']);
 $replace[] = sizeof($relate) == 0 ? '' : implode('', $relate);
 $replace[] = number_format($index['comments']);
 $replace[] = $index['id'];
 $replace[] = $login['password'];
 $replace[] = $login['email'];
 if (isset($register_antispamchar)) {
     $replace[] = $register_antispamchar;
     $replace[] = $isAdmin ? $_SESSION[$register_antispamchar] : '';
 } else {
     $replace[] = '';
     $replace[] = '';
 }
开发者ID:phannack,项目名称:GCMS,代码行数:31,代码来源:view.php

示例15: mktime

 // หน้าหลัก
 $breadcrumbs['HOME'] = gcms::breadcrumb('icon-home', $canonical, $install_modules[$module_list[0]]['menu_tooltip'], $install_modules[$module_list[0]]['menu_text'], $breadcrumb);
 if (isset($ds) || !empty($tag)) {
     // tag หรือ calendar
     if (!isset($default)) {
         include ROOT_PATH . 'modules/document/default.config.php';
     }
     $index = $default['document'];
     $index['categories'] = 0;
     if (isset($ds)) {
         // เรียกจากวันที่
         $selday = mktime(0, 0, 0, $ds[2], $ds[1], (int) $ds[3] - $lng['YEAR_OFFSET']);
         $nextday = $selday + 86400;
         $sqls[] = "I.`create_date` >= {$selday}";
         $sqls[] = "I.`create_date` < {$nextday}";
         $index['topic'] = $lng['LNG_DOCUMENT_DATE'] . ' ' . gcms::mktime2date($selday, 'd F Y');
         // breadcrumb ของวันที่ที่เรียก
         $breadcrumbs['MODULE'] = gcms::breadcrumb('', gcms::getURL('calendar', "{$ds['1']}-{$ds['2']}-{$ds['3']}"), $index['topic'], $index['topic'], $breadcrumb);
     } elseif ($tag != '') {
         // เรียกตาม tags
         $index['topic'] = $lng['LNG_TAGS'] . ' ' . $tag;
         // breadcrumb ของ tag ที่เรียก
         $breadcrumbs['MODULE'] = gcms::breadcrumb('', gcms::getURL('tag', $tag), $index['topic'], $index['topic'], $breadcrumb);
     }
     $index['keywords'] = "{$index['topic']},{$keywords}";
     $index['description'] = "{$index['topic']},{$description}";
     $index['menu_text'] = $index['topic'];
     $index['module'] = 'document';
     include ROOT_PATH . 'modules/document/default.config.php';
     $index = array_merge($default['document'], $index);
 } else {
开发者ID:phannack,项目名称:GCMS,代码行数:31,代码来源:list.php


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