本文整理汇总了PHP中zdate函数的典型用法代码示例。如果您正苦于以下问题:PHP zdate函数的具体用法?PHP zdate怎么用?PHP zdate使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了zdate函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: getPollinfo
/**
* @brief returns poll infomation
*/
function getPollinfo()
{
$args = new stdClass();
$poll_srl = Context::get('poll_srl');
$logged_info = Context::get('logged_info');
if (!$poll_srl || $poll_srl == '') {
return new Object(-1, "poll_no_poll_srl");
}
$args->poll_srl = $poll_srl;
// Get the information related to the survey
$columnList = array('poll_count', 'stop_date', 'poll_type', 'member_srl');
$output = executeQuery('poll.getPoll', $args, $columnList);
$poll_member_srl = $output->data->member_srl;
if (!$output->data) {
return new Object(-1, "poll_no_poll_or_deleted_poll");
}
$poll = new stdClass();
$poll->is_polled = 0;
if ($output->data->stop_date < date("Ymd")) {
$poll->is_polled = 1;
}
$poll->poll_count = (int) $output->data->poll_count;
$poll->poll_type = (int) $output->data->poll_type;
$poll->stop_date = zdate($output->data->stop_date, "Y-m-d");
$columnList = array('poll_index_srl', 'title', 'checkcount', 'poll_count');
$output = executeQueryArray('poll.getPollTitle', $args, $columnList);
if (!$output->data) {
return;
}
$poll->poll = array();
foreach ($output->data as $key => $val) {
$poll->poll[$val->poll_index_srl] = new stdClass();
$poll->poll[$val->poll_index_srl]->poll_index_srl = $val->poll_index_srl;
$poll->poll[$val->poll_index_srl]->title = $val->title;
$poll->poll[$val->poll_index_srl]->checkcount = $val->checkcount;
$poll->poll[$val->poll_index_srl]->poll_count = $val->poll_count;
}
$output = executeQueryArray('poll.getPollItem', $args);
foreach ($output->data as $key => $val) {
unset($val->upload_target_srl);
unset($val->poll_srl);
$val->my_item = false;
if (($val->add_user_srl == $logged_info->member_srl || $poll_member_srl == $logged_info->member_srl) && $val->add_user_srl != 0) {
$val->my_item = true;
}
$poll->poll[$val->poll_index_srl]->item[] = $val;
}
$poll->poll_srl = $poll_srl;
$caniadditem = $this->isAbletoAddItem($poll->poll_type) && !!$logged_info->member_srl;
$oPollModel = getModel('poll');
if ($oPollModel->isPolled($poll_srl)) {
$poll->is_polled = 1;
}
$this->add('poll', $poll);
$this->add('caniadditem', $caniadditem);
}
开发者ID:xefork-YJSoft,项目名称:rhymix,代码行数:59,代码来源:poll.model.php
示例2: doLogin
/**
* Log-in
*
* @param string $user_id
* @param string $password
* @param boolean $keep_signed
*
* @return Object
*/
function doLogin($user_id, $password = '', $keep_signed = false)
{
$user_id = strtolower($user_id);
if (!$user_id) {
return new Object(-1, 'null_user_id');
}
// Call a trigger before log-in (before)
$trigger_obj = new stdClass();
$trigger_obj->user_id = $user_id;
$trigger_obj->password = $password;
$trigger_output = ModuleHandler::triggerCall('member.doLogin', 'before', $trigger_obj);
if (!$trigger_output->toBool()) {
return $trigger_output;
}
// Create a member model object
$oMemberModel = getModel('member');
// check IP access count.
$config = $oMemberModel->getMemberConfig();
$args = new stdClass();
$args->ipaddress = $_SERVER['REMOTE_ADDR'];
// check identifier
if ($config->identifier == 'email_address' || strpos($user_id, '@') !== false) {
// Get user_id information
$this->memberInfo = $oMemberModel->getMemberInfoByEmailAddress($user_id);
// Set an invalid user if no value returned
if (!$user_id || strtolower($this->memberInfo->email_address) != strtolower($user_id)) {
return $this->recordLoginError(-1, 'invalid_email_address');
}
} else {
// Get user_id information
$this->memberInfo = $oMemberModel->getMemberInfoByUserID($user_id);
// Set an invalid user if no value returned
if (!$user_id || strtolower($this->memberInfo->user_id) != strtolower($user_id)) {
return $this->recordLoginError(-1, 'invalid_user_id');
}
}
$output = executeQuery('member.getLoginCountByIp', $args);
$errorCount = $output->data->count;
if ($errorCount >= $config->max_error_count) {
$last_update = strtotime($output->data->last_update);
$term = intval($_SERVER['REQUEST_TIME'] - $last_update);
if ($term < $config->max_error_count_time) {
$term = $config->max_error_count_time - $term;
if ($term < 60) {
$term = intval($term) . lang('unit_sec');
} elseif (60 <= $term && $term < 3600) {
$term = intval($term / 60) . lang('unit_min');
} elseif (3600 <= $term && $term < 86400) {
$term = intval($term / 3600) . lang('unit_hour');
} else {
$term = intval($term / 86400) . lang('unit_day');
}
return new Object(-1, sprintf(lang('excess_ip_access_count'), $term));
} else {
$args->ipaddress = $_SERVER['REMOTE_ADDR'];
$output = executeQuery('member.deleteLoginCountByIp', $args);
}
}
// Password Check
if ($password && !$oMemberModel->isValidPassword($this->memberInfo->password, $password, $this->memberInfo->member_srl)) {
return $this->recordMemberLoginError(-1, 'invalid_password', $this->memberInfo);
}
// If denied == 'Y', notify
if ($this->memberInfo->denied == 'Y') {
$args->member_srl = $this->memberInfo->member_srl;
$output = executeQuery('member.chkAuthMail', $args);
if ($output->toBool() && $output->data->count != '0') {
$_SESSION['auth_member_srl'] = $this->memberInfo->member_srl;
$redirectUrl = getUrl('', 'act', 'dispMemberResendAuthMail');
return $this->setRedirectUrl($redirectUrl, new Object(-1, 'msg_user_not_confirmed'));
}
$refused_reason = $this->memberInfo->refused_reason ? '<br>' . lang('refused_reason') . ': ' . $this->memberInfo->refused_reason : '';
return new Object(-1, lang('msg_user_denied') . $refused_reason);
}
// Notify if user is limited
if ($this->memberInfo->limit_date && substr($this->memberInfo->limit_date, 0, 8) >= date("Ymd")) {
$limited_reason = $this->memberInfo->limited_reason ? '<br>' . lang('refused_reason') . ': ' . $this->memberInfo->limited_reason : '';
return new Object(-9, sprintf(lang('msg_user_limited'), zdate($this->memberInfo->limit_date, "Y-m-d")) . $limited_reason);
}
// Do not allow login as admin if not in allowed IP list
if ($this->memberInfo->is_admin === 'Y' && $this->act === 'procMemberLogin') {
$oMemberAdminModel = getAdminModel('member');
if (!$oMemberAdminModel->getMemberAdminIPCheck()) {
return new Object(-1, 'msg_admin_ip_not_allowed');
}
}
// Update the latest login time
$args->member_srl = $this->memberInfo->member_srl;
$output = executeQuery('member.updateLastLogin', $args);
$site_module_info = Context::get('site_module_info');
$this->_clearMemberCache($args->member_srl, $site_module_info->site_srl);
//.........这里部分代码省略.........
开发者ID:rhymix,项目名称:rhymix,代码行数:101,代码来源:member.controller.php
示例3: zdate
?>
)
<?php
}
}
?>
</div>
</div>
<div class="x_control-group">
<label class="x_control-label"><?php
echo $__Context->lang->regdate;
?>
</label>
<div class="x_controls">
<?php
echo zdate($__Context->widgetstyle_info->date, 'Y-m-d');
?>
</div>
</div>
<?php
if ($__Context->widgetstyle_info->extra_var && count($__Context->widgetstyle_info->extra_var)) {
foreach ($__Context->widgetstyle_info->extra_var as $__Context->id => $__Context->var) {
?>
<?php
$__Context->suggestion_id++;
?>
<?php
if (!$__Context->not_first && !$__Context->var->group) {
?>
<section class="section"><?php
开发者ID:umjinsun12,项目名称:dngshin,代码行数:31,代码来源:bfdf39a8ae88a32a6a21e047185ccdc2.compiled.php
示例4: procWAP
function procWAP(&$oMobile)
{
$content = '';
// 플래닛의 기본 단위인 날짜를 미리 계산 모듈에 있는 동작인데... 애드온이 모듈보다 일찍 실행된다;
$last_date = $this->planet->getContentLastDay();
$date = Context::get('date');
if (!$date || $date > $last_date) {
$date = $last_date;
}
Context::set('date', $date);
Context::set('prev_date', $this->planet->getPrevDate($date));
Context::set('next_date', $this->planet->getNextDate($date));
$type = Context::get('type');
if (!$type) {
$type = 'all';
}
Context::set('type', $type);
$tagtab = null;
switch ($type) {
case 'wantyou':
$sort_index = 'documents.voted_count';
$order = 'desc';
break;
case 'best':
$sort_index = 'documents.comment_count';
$order = 'desc';
break;
case 'all':
$sort_index = 'documents.list_order';
$order = 'asc';
break;
}
$page = Context::get('page');
$oPlanetModel =& getModel('planet');
$output = $oPlanetModel->getNewestContentList(null, $date, $page, 9, $sort_index, $order, $tagtab);
$title = Context::getBrowserTitle() . ' [' . zdate($date, 'Y') . Context::getLang('unit_year') . zdate($date, 'm') . Context::getLang('unit_month') . zdate($date, 'd') . Context::getLang('unit_day') . ']';
// 댓글 보기 일 경우
if ($this->act == 'dispPlanetContentCommentList') {
$page = Context::get('page');
$document_srl = Context::get('document_srl');
$oPlanetModel =& getModel('planet');
$output = $oPlanetModel->getReplyList($document_srl, $page);
$reply_list = $output->data;
$title .= ' - ' . Context::getLang('comment');
if (is_array($reply_list)) {
foreach ($reply_list as $key => $reply) {
$content .= '[<strong>' . $reply->nick_name . '</strong>] ';
$content .= $reply->content;
}
}
// 상위 페이지를 목록으로 돌아가기로 지정
$oMobile->setUpperUrl(getUrl('act', ''), Context::getLang('cmd_go_upper'));
} else {
if ($output->page_navigation->total_page > 1) {
if ($output->page_navigation->cur_page < $output->page_navigation->last_page) {
// next/prevUrl 지정
$oMobile->setPrevUrl(getUrl('page', $output->page_navigation->cur_page + 1), sprintf('%s (%d/%d)', Context::getLang('cmd_prev'), $output->page_navigation->cur_page + 1, $output->page_navigation->total_page));
}
if ($output->page_navigation->cur_page > 1) {
$oMobile->setNextUrl(getUrl('page', $output->page_navigation->cur_page - 1), sprintf('%s (%d/%d)', Context::getLang('cmd_next'), $output->page_navigation->cur_page - 1, $output->page_navigation->total_page));
}
}
if (!$output->data || !count($output->data)) {
$content .= Context::getLang('no_documents');
}
foreach ($output->data as $no => $item) {
$obj = null;
$obj['href'] = getUrl('mid', $_GET['mid'], 'document_srl', $item->get('document_srl'), 'act', 'dispPlanetContentCommentList');
$obj['link'] = '[' . htmlspecialchars($item->getNickName()) . '] ' . "\n";
$obj['link'] .= htmlspecialchars(strip_tags($item->getContent()));
if ($item->getPostScript()) {
$obj['extra'] = Context::getLang('planet_postscript') . htmlspecialchars($item->getPostScript());
}
if (is_array($item->getArrTags())) {
$obj['extra'] .= '<br />TAG:';
$obj['extra'] .= implode(', ', $item->getArrTags());
}
$obj['link'] = $obj['text'] = $obj['link'];
$childs[] = $obj;
}
$oMobile->setChilds($childs);
$prev_date = Context::get('prev_date');
if ($prev_date) {
$oMobile->setEtcBtn(getUrl('date', $prev_date, 'document_srl', ''), '<');
}
$next_date = Context::get('next_date');
if ($next_date) {
$oMobile->setEtcBtn(getUrl('date', $next_date, 'document_srl', ''), '>');
}
}
$oMobile->setTitle($title);
$oMobile->setContent($content);
}
开发者ID:eondcom,项目名称:xe-planet,代码行数:93,代码来源:planet.wap.php
示例5: _getMemberInputTag
/**
* Get tags by the member info type
*
* @param object $memberInfo
* @param boolean $isAdmin (true : admin, false : not admin)
*
* @return array
*/
function _getMemberInputTag($memberInfo, $isAdmin = false)
{
$oMemberModel = getModel('member');
$extend_form_list = $oMemberModel->getCombineJoinForm($memberInfo);
$security = new Security($extend_form_list);
$security->encodeHTML('..column_title', '..description', '..default_value.');
if ($memberInfo) {
$memberInfo = get_object_vars($memberInfo);
}
$member_config = $this->memberConfig;
if (!$this->memberConfig) {
$member_config = $this->memberConfig = $oMemberModel->getMemberConfig();
}
$formTags = array();
global $lang;
foreach ($member_config->signupForm as $no => $formInfo) {
if (!$formInfo->isUse) {
continue;
}
if ($formInfo->name == $member_config->identifier || $formInfo->name == 'password') {
continue;
}
$formTag = new stdClass();
$inputTag = '';
$formTag->title = $formInfo->isDefaultForm ? $lang->{$formInfo->name} : $formInfo->title;
if ($isAdmin) {
if ($formInfo->mustRequired) {
$formTag->title = '<em style="color:red">*</em> ' . $formTag->title;
}
} else {
if ($formInfo->required && $formInfo->name != 'password') {
$formTag->title = '<em style="color:red">*</em> ' . $formTag->title;
}
}
$formTag->name = $formInfo->name;
if ($formInfo->isDefaultForm) {
if ($formInfo->imageType) {
$formTag->type = 'image';
if ($formInfo->name == 'profile_image') {
$target = $memberInfo['profile_image'];
$functionName = 'doDeleteProfileImage';
} else {
if ($formInfo->name == 'image_name') {
$target = $memberInfo['image_name'];
$functionName = 'doDeleteImageName';
} else {
if ($formInfo->name == 'image_mark') {
$target = $memberInfo['image_mark'];
$functionName = 'doDeleteImageMark';
}
}
}
if ($target->src) {
$inputTag = sprintf('<input type="hidden" name="__%s_exist" value="true" /><span id="%s"><img src="%s" alt="%s" /> <button type="button" onclick="%s(%d);return false;">%s</button></span>', $formInfo->name, $formInfo->name . 'tag', $target->src, $formInfo->title, $functionName, $memberInfo['member_srl'], $lang->cmd_delete);
} else {
$inputTag = sprintf('<input type="hidden" name="__%s_exist" value="false" />', $formInfo->name);
}
$inputTag .= sprintf('<input type="file" name="%s" id="%s" value="" accept="image/*" /><p class="help-block">%s: %dpx, %s: %dpx</p>', $formInfo->name, $formInfo->name, $lang->{$formInfo->name . '_max_width'}, $member_config->{$formInfo->name . '_max_width'}, $lang->{$formInfo->name . '_max_height'}, $member_config->{$formInfo->name . '_max_height'});
} else {
if ($formInfo->name == 'birthday') {
$formTag->type = 'date';
$inputTag = sprintf('<input type="hidden" name="birthday" id="date_birthday" value="%s" /><input type="text" placeholder="YYYY-MM-DD" name="birthday_ui" class="inputDate" id="birthday" value="%s" readonly="readonly" /> <input type="button" value="%s" class="btn dateRemover" />', $memberInfo['birthday'], zdate($memberInfo['birthday'], 'Y-m-d', false), $lang->cmd_delete);
} else {
if ($formInfo->name == 'find_account_question') {
$formTag->type = 'select';
$inputTag = '<select name="find_account_question" id="find_account_question" style="display:block;margin:0 0 8px 0">%s</select>';
$optionTag = array();
foreach ($lang->find_account_question_items as $key => $val) {
if ($key == $memberInfo['find_account_question']) {
$selected = 'selected="selected"';
} else {
$selected = '';
}
$optionTag[] = sprintf('<option value="%s" %s >%s</option>', $key, $selected, $val);
}
$inputTag = sprintf($inputTag, implode('', $optionTag));
$inputTag .= '<input type="text" name="find_account_answer" id="find_account_answer" title="' . Context::getLang('find_account_answer') . '" value="' . $memberInfo['find_account_answer'] . '" />';
} else {
if ($formInfo->name == 'email_address') {
$formTag->type = 'email';
$inputTag = '<input type="email" name="email_address" id="email_address" value="' . $memberInfo['email_address'] . '" />';
} else {
if ($formInfo->name == 'homepage') {
$formTag->type = 'url';
$inputTag = '<input type="url" name="homepage" id="homepage" value="' . $memberInfo['homepage'] . '" />';
} else {
if ($formInfo->name == 'blog') {
$formTag->type = 'url';
$inputTag = '<input type="url" name="blog" id="blog" value="' . $memberInfo['blog'] . '" />';
} else {
$formTag->type = 'text';
$inputTag = sprintf('<input type="text" name="%s" id="%s" value="%s" />', $formInfo->name, $formInfo->name, $memberInfo[$formInfo->name]);
//.........这里部分代码省略.........
开发者ID:umjinsun12,项目名称:dngshin,代码行数:101,代码来源:member.admin.view.php
示例6: getUpdateDT
function getUpdateDT()
{
return zdate($this->get('last_update'), 'c', false);
}
开发者ID:kkkyyy03,项目名称:coffeemix,代码行数:4,代码来源:document.item.php
示例7: getRegdate
function getRegdate($format = 'Y.m.d H:i:s')
{
return zdate($this->get('regdate'), $format);
}
开发者ID:hottaro,项目名称:xpressengine,代码行数:4,代码来源:content.class.php
示例8: _getMemberInputTag
/**
* Get tags by the member info type
*
* @param object $memberInfo
* @param boolean $isAdmin (true : admin, false : not admin)
*
* @return array
**/
function _getMemberInputTag($memberInfo, $isAdmin = false)
{
$oMemberModel =& getModel('member');
$extend_form_list = $oMemberModel->getCombineJoinForm($memberInfo);
if ($memberInfo) {
$memberInfo = get_object_vars($memberInfo);
}
$member_config = $oMemberModel->getMemberConfig();
$formTags = array();
global $lang;
foreach ($member_config->signupForm as $no => $formInfo) {
if (!$formInfo->isUse) {
continue;
}
if ($formInfo->name == $member_config->identifier || $formInfo->name == 'password') {
continue;
}
unset($formTag);
$inputTag = '';
$formTag->title = $formInfo->isDefaultForm ? $lang->{$formInfo->name} : $formInfo->title;
if ($isAdmin) {
if ($formInfo->mustRequired) {
$formTag->title = $formTag->title . ' <em style="color:red">*</em>';
}
} else {
if ($formInfo->required && $formInfo->name != 'password') {
$formTag->title = $formTag->title . ' <em style="color:red">*</em>';
}
}
$formTag->name = $formInfo->name;
if ($formInfo->isDefaultForm) {
if ($formInfo->imageType) {
if ($formInfo->name == 'profile_image') {
$target = $memberInfo['profile_image'];
$functionName = 'doDeleteProfileImage';
} elseif ($formInfo->name == 'image_name') {
$target = $memberInfo['image_name'];
$functionName = 'doDeleteImageName';
} elseif ($formInfo->name == 'image_mark') {
$target = $memberInfo['image_mark'];
$functionName = 'doDeleteImageMark';
}
if ($target->src) {
$inputTag = sprintf('<p class="a"><input type="hidden" name="__%s_exist" value="true" /><span id="%s"><img src="%s" alt="%s" /> <button type="button" class="text" onclick="%s(%d);return false;">%s</button></span></p>', $formInfo->name, $formInfo->name . 'tag', $target->src, $formInfo->title, $functionName, $memberInfo['member_srl'], $lang->cmd_delete);
} else {
$inputTag = sprintf('<input type="hidden" name="__%s_exist" value="false" />', $formInfo->name);
}
$inputTag .= sprintf('<p class="a"><input type="file" name="%s" id="%s" value="" /></p><p><span class="desc">%s : %dpx, %s : %dpx</span></p>', $formInfo->name, $formInfo->name, $lang->{$formInfo->name . '_max_width'}, $member_config->{$formInfo->name . '_max_width'}, $lang->{$formInfo->name . '_max_height'}, $member_config->{$formInfo->name . '_max_height'});
} elseif ($formInfo->name == 'birthday') {
$inputTag = sprintf('<input type="hidden" name="birthday" id="date_birthday" value="%s" /><input type="text" class="inputDate" id="birthday" value="%s" /> <input type="button" value="%s" class="dateRemover" />', $memberInfo['birthday'], zdate($memberInfo['birthday'], 'Y-m-d', false), $lang->cmd_delete);
} elseif ($formInfo->name == 'find_account_question') {
$inputTag = '<select name="find_account_question" style="width:290px; display:block;">%s</select>';
$optionTag = array();
foreach ($lang->find_account_question_items as $key => $val) {
if ($key == $memberInfo['find_account_question']) {
$selected = 'selected="selected"';
} else {
$selected = '';
}
$optionTag[] = sprintf('<option value="%s" %s >%s</option>', $key, $selected, $val);
}
$inputTag = sprintf($inputTag, implode('', $optionTag));
$inputTag .= '<input type="text" name="find_account_answer" title="' . Context::getLang('find_account_answer') . '" value="' . $memberInfo['find_account_answer'] . '" class="inputText long tall" />';
} else {
$inputTag = sprintf('<input type="text" name="%s" value="%s" class="inputText long tall" />', $formInfo->name, $memberInfo[$formInfo->name]);
}
} else {
$extendForm = $extend_form_list[$formInfo->member_join_form_srl];
$replace = array('column_name' => $extendForm->column_name, 'value' => $extendForm->value);
$extentionReplace = array();
if ($extendForm->column_type == 'text' || $extendForm->column_type == 'homepage' || $extendForm->column_type == 'email_address') {
$template = '<input type="text" name="%column_name%" value="%value%" />';
} elseif ($extendForm->column_type == 'tel') {
$extentionReplace = array('tel_0' => $extendForm->value[0], 'tel_1' => $extendForm->value[1], 'tel_2' => $extendForm->value[2]);
$template = '<input type="text" name="%column_name%[]" value="%tel_0%" size="4" maxlength="4" style="width:30px" />-<input type="text" name="%column_name%[]" value="%tel_1%" size="4" maxlength="4" style="width:30px" />-<input type="text" name="%column_name%[]" value="%tel_2%" size="4" maxlength="4" style="width:30px" />';
} elseif ($extendForm->column_type == 'textarea') {
$template = '<textarea name="%column_name%" rows="8" cols="42">%value%</textarea>';
} elseif ($extendForm->column_type == 'checkbox') {
$template = '';
if ($extendForm->default_value) {
$__i = 0;
foreach ($extendForm->default_value as $v) {
$checked = '';
if (is_array($extendForm->value) && in_array($v, $extendForm->value)) {
$checked = 'checked="checked"';
}
$template .= '<input type="checkbox" id="%column_name%' . $__i . '" name="%column_name%[]" value="' . htmlspecialchars($v) . '" ' . $checked . ' /><label for="%column_name%' . $__i . '">' . $v . '</label>';
$__i++;
}
}
} elseif ($extendForm->column_type == 'radio') {
$template = '';
//.........这里部分代码省略.........
开发者ID:relip,项目名称:xe-core,代码行数:101,代码来源:member.admin.view.php
示例9: getTimeGap
/**
* If the recent post within a day, output format of YmdHis is "min/hours ago from now". If not within a day, it return format string.
*
* @param string $date Time value in format of YYYYMMDDHHIISS
* @param string $format If gap is within a day, returns this format.
* @return string
*/
function getTimeGap($date, $format = 'Y.m.d')
{
$timestamp = ztime($date);
$gap = RX_TIME - $timestamp;
if ($gap < 60 * 60 * 24) {
return Rhymix\Framework\DateTime::getRelativeTimestamp($gap >= 60 ? $timestamp : RX_TIME - 60);
} else {
return zdate($date, $format);
}
}
开发者ID:rhymix,项目名称:rhymix,代码行数:17,代码来源:legacy.php
示例10: getEncodeEmailAddress
<td class="nowr"><?php
echo $__Context->val->setting;
?>
</td>
<td class="nowr">
<span class="masked"><?php
echo getEncodeEmailAddress($__Context->member_info->email_address);
?>
</span>
</td>
<td class="nowr"><?php
echo zdate($__Context->val->regdate, 'Y-m-d');
?>
</td>
<td class="nowr"><?php
echo zdate($__Context->val->last_login, 'Y-m-d');
?>
</td>
<td><input type="checkbox" name="user" value='<?php
echo $__Context->val->reg_id . "\t" . $__Context->val->sort . "\t" . $__Context->member_info->user_name . "\t" . $__Context->member_info->nick_name;
?>
' /></td>
</tr>
<?php
}
}
?>
</tbody>
</table>
<div class="btnArea">
开发者ID:umjinsun12,项目名称:dngshin,代码行数:31,代码来源:ff394bdb5fb44babcbe8f1193eca12c5.compiled.php
示例11: doLogin
/**
* Log-in
*
* @param string $user_id
* @param string $password
* @param boolean $keep_signed
*
* @return Object
**/
function doLogin($user_id, $password = '', $keep_signed = false)
{
$user_id = strtolower($user_id);
if (!$user_id) {
return new Object(-1, 'null_user_id');
}
// Call a trigger before log-in (before)
$trigger_obj->user_id = $user_id;
$trigger_obj->password = $password;
$trigger_output = ModuleHandler::triggerCall('member.doLogin', 'before', $trigger_obj);
if (!$trigger_output->toBool()) {
return $trigger_output;
}
// Create a member model object
$oMemberModel =& getModel('member');
// check IP access count.
$config = $oMemberModel->getMemberConfig();
$args->ipaddress = $_SERVER['REMOTE_ADDR'];
$output = executeQuery('member.getLoginCountByIp', $args);
$count = (int) $output->data->count;
if ($config->max_error_count < $count) {
$last_update = strtotime($output->data->last_update);
$term = intval(time() - $last_update);
if ($term < $config->max_error_count_time) {
$term = $config->max_error_count_time - $term;
if ($term < 60) {
$term = intval($term) . Context::getLang('unit_sec');
} elseif (60 <= $term && $term < 3600) {
$term = intval($term / 60) . Context::getLang('unit_min');
} elseif (3600 <= $term && $term < 86400) {
$term = intval($term / 3600) . Context::getLang('unit_hour');
} else {
$term = intval($term / 86400) . Context::getLang('unit_day');
}
return new Object(-1, sprintf(Context::getLang('excess_ip_access_count'), $term));
} else {
$args->ipaddress = $_SERVER['REMOTE_ADDR'];
$output = executeQuery('member.deleteLoginCountByIp', $args);
}
}
// check identifier
if ($config->identifier == 'email_address') {
// Get user_id information
$this->memberInfo = $oMemberModel->getMemberInfoByEmailAddress($user_id);
// Set an invalid user if no value returned
if (!$user_id || strtolower($this->memberInfo->email_address) != strtolower($user_id)) {
return $this->recordLoginError(-1, 'invalid_email_address');
}
} else {
// Get user_id information
$this->memberInfo = $oMemberModel->getMemberInfoByUserID($user_id);
// Set an invalid user if no value returned
if (!$user_id || strtolower($this->memberInfo->user_id) != strtolower($user_id)) {
return $this->recordLoginError(-1, 'invalid_user_id');
}
}
// Password Check
if ($password && !$oMemberModel->isValidPassword($this->memberInfo->password, $password, $this->memberInfo->member_srl)) {
return $this->recordMemberLoginError(-1, 'invalid_password', $this->memberInfo);
}
// If denied == 'Y', notify
if ($this->memberInfo->denied == 'Y') {
$args->member_srl = $this->memberInfo->member_srl;
$output = executeQuery('member.chkAuthMail', $args);
if ($output->toBool() && $output->data->count != '0') {
$_SESSION['auth_member_srl'] = $this->memberInfo->member_srl;
$redirectUrl = getUrl('', 'act', 'dispMemberResendAuthMail');
return $this->setRedirectUrl($redirectUrl, new Object(-1, 'msg_user_not_confirmed'));
}
return new Object(-1, 'msg_user_denied');
}
// Notify if denied_date is less than the current time
if ($this->memberInfo->limit_date && substr($this->memberInfo->limit_date, 0, 8) >= date("Ymd")) {
return new Object(-1, sprintf(Context::getLang('msg_user_limited'), zdate($this->memberInfo->limit_date, "Y-m-d")));
}
// Update the latest login time
$args->member_srl = $this->memberInfo->member_srl;
$output = executeQuery('member.updateLastLogin', $args);
// check if there is login fail records.
$output = executeQuery('member.getLoginCountHistoryByMemberSrl', $args);
if ($output->data && $output->data->content) {
$title = Context::getLang('login_fail_report');
$message = '<ul>';
$content = unserialize($output->data->content);
foreach ($content as $val) {
$message .= '<li>' . date('Y-m-d H:i:s P', $val[2]) . '<br /> Access IP: ' . $val[0] . '<br /> Message: ' . $val[1] . '</li>';
}
$message .= '</ul>';
$content = sprintf(Context::getLang('login_fail_report_contents'), $message, date('Y-m-d H:i:s P'));
//send message
$oCommunicationController =& getController('communication');
//.........这里部分代码省略.........
开发者ID:relip,项目名称:xe-core,代码行数:101,代码来源:member.controller.php
示例12: foreach
<th scope="col" style="width:300px;">결과값</th>
</tr>
</thead>
<tbody>
<?php
if ($__Context->androidpushapp_list && count($__Context->androidpushapp_list)) {
foreach ($__Context->androidpushapp_list as $__Context->no => $__Context->val) {
?>
<tr>
<td><?php
echo zdate($__Context->val->push_date, "Y-m-d");
?>
</br>
<?php
echo zdate($__Context->val->push_date, "H:i:s");
?>
</td>
<td><?php
echo $__Context->val->type;
?>
</td>
<td><?php
if ($__Context->val->type == "Message" || $__Context->val->type == "Test") {
?>
[<?php
echo $__Context->val->target_browser;
?>
] <?php
echo $__Context->val->target_title;
} else {
开发者ID:umjinsun12,项目名称:dngshin,代码行数:31,代码来源:7a3fd7eb29096e917f4e9f6cbca035e0.compiled.php
示例13: getAgo
/**
* @brief 주어진 시간이 얼마 전 인지 반환
* @param string YmdHis
* @return string
**/
function getAgo($datetime)
{
global $lang;
$lang_type = Context::getLangType();
$display = $lang->ncenterlite_date;
$ago = $lang->ncenterlite_ago;
$date = getdate(strtotime(zdate($datetime, 'Y-m-d H:i:s')));
$current = getdate();
$p = array('year', 'mon', 'mday', 'hours', 'minutes', 'seconds');
$factor = array(0, 12, 30, 24, 60, 60);
for ($i = 0; $i < 6; $i++) {
if ($i > 0) {
$current[$p[$i]] += $current[$p[$i - 1]] * $factor[$i];
$date[$p[$i]] += $date[$p[$i - 1]] * $factor[$i];
}
if ($current[$p[$i]] - $date[$p[$i]] > 1) {
$value = $current[$p[$i]] - $date[$p[$i]];
if ($lang_type == 'en') {
return $value . ' ' . $display[$i] . ($value != 1 ? 's' : '') . ' ' . $ago;
}
return $value . $display[$i] . ' ' . $ago;
}
}
return zdate($datetime, 'Y-m-d');
}
开发者ID:rhymix,项目名称:rhymix,代码行数:30,代码来源:ncenterlite.model.php
示例14: getFormHTML
/**
* Returns a form based on its type
*
* @return string Returns a html form.
*/
function getFormHTML($include_desc = TRUE)
{
static $id_num = 1000;
$type = $this->type;
$value = $this->_getTypeValue($this->type, $this->value);
$default = $this->_getTypeValue($this->type, $this->default);
$column_name = $this->name;
$tmp_id = $column_name . '-' . $id_num++;
$buff = '';
switch ($type) {
// Homepage
case 'homepage':
$buff .= '<input type="text" name="' . $column_name . '" value="' . $value . '" class="homepage" />';
break;
// Email Address
// Email Address
case 'email_address':
$buff .= '<input type="text" name="' . $column_name . '" value="' . $value . '" class="email_address" />';
break;
// Phone Number
// Phone Number
case 'tel':
$buff .= '<input type="text" name="' . $column_name . '[]" value="' . $value[0] . '" size="4" maxlength="4" class="tel" />' . '<input type="text" name="' . $column_name . '[]" value="' . $value[1] . '" size="4" maxlength="4" class="tel" />' . '<input type="text" name="' . $column_name . '[]" value="' . $value[2] . '" size="4" maxlength="4" class="tel" />';
break;
// textarea
// textarea
case 'textarea':
$buff .= '<textarea name="' . $column_name . '" rows="8" cols="42">' . $value . '</textarea>';
break;
// multiple choice
// multiple choice
case 'checkbox':
$buff .= '<ul>';
foreach ($default as $v) {
if ($value && in_array(trim($v), $value)) {
$checked = ' checked="checked"';
} else {
$checked = '';
}
// Temporary ID for labeling
$tmp_id = $column_name . '-' . $id_num++;
$buff .= '<li><label for="' . $tmp_id . '"><input type="checkbox" name="' . $column_name . '[]" id="' . $tmp_id . '" value="' . htmlspecialchars($v) . '" ' . $checked . ' />' . $v . '</label></li>';
}
$buff .= '</ul>';
break;
// single choice
// single choice
case 'select':
$buff .= '<select name="' . $column_name . '" class="select">';
foreach ($default as $v) {
if ($value && in_array(trim($v), $value)) {
$selected = ' selected="selected"';
} else {
$selected = '';
}
$buff .= '<option value="' . $v . '" ' . $selected . '>' . $v . '</option>';
}
$buff .= '</select>';
break;
// radio
// radio
case 'radio':
$buff .= '<ul>';
foreach ($default as $v) {
if ($value && in_array(trim($v), $value)) {
$checked = ' checked="checked"';
} else {
$checked = '';
}
// Temporary ID for labeling
$tmp_id = $column_name . '-' . $id_num++;
$buff .= '<li><input type="radio" name="' . $column_name . '" id="' . $tmp_id . '" ' . $checked . ' value="' . $v . '" class="radio" /><label for="' . $tmp_id . '">' . $v . '</label></li>';
}
$buff .= '</ul>';
break;
// date
// date
case 'date':
// datepicker javascript plugin load
Context::loadJavascriptPlugin('ui.datepicker');
$buff .= '<input type="hidden" name="' . $column_name . '" value="' . $value . '" />' . '<input type="text" id="date_' . $column_name . '" value="' . zdate($value, 'Y-m-d') . '" class="date" /> <input type="button" value="' . Context::getLang('cmd_delete') . '" id="dateRemover_' . $column_name . '" />' . "\n" . '<script>' . "\n" . '(function($){' . "\n" . ' $(function(){' . "\n" . ' var option = { dateFormat: "yy-mm-dd", changeMonth:true, changeYear:true, gotoCurrent: false,yearRange:\'-100:+10\', onSelect:function(){' . "\n" . ' $(this).prev(\'input[type="hidden"]\').val(this.value.replace(/-/g,""))}' . "\n" . ' };' . "\n" . ' $.extend(option,$.datepicker.regional[\'' . Context::getLangType() . '\']);' . "\n" . ' $("#date_' . $column_name . '").datepicker(option);' . "\n" . ' $("#dateRemover_' . $column_name . '").click(function(){' . "\n" . ' $(this).siblings("input").val("");' . "\n" . ' return false;' . "\n" . ' })' . "\n" . ' });' . "\n" . '})(jQuery);' . "\n" . '</script>';
break;
// address
// address
case "kr_zip":
// krzip address javascript plugin load
Context::loadJavascriptPlugin('ui.krzip');
$buff .= '<div id="addr_searched_' . $column_name . '" style="display:' . ($value[0] ? 'block' : 'none') . ';">' . '<input type="text" readonly="readonly" name="' . $column_name . '[]" value="' . $value[0] . '" class="address" />' . '<a href="#" onclick="doShowKrZipSearch(this, \'' . $column_name . '\'); return false;" class="button red"><span>' . Context::getLang('cmd_cancel') . '</span></a>' . '</div>' . '<div id="addr_list_' . $column_name . '" style="display:none;">' . '<select name="addr_list_' . $column_name . '"></select>' . '<a href="#" onclick=&quo
|
请发表评论