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


PHP langdate函数代码示例

本文整理汇总了PHP中langdate函数的典型用法代码示例。如果您正苦于以下问题:PHP langdate函数的具体用法?PHP langdate怎么用?PHP langdate使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: main

 function main($page)
 {
     /* Login */
     if (!$this->member_id['name']) {
         return $this->lang['pay_need_login'];
     }
     if (intval($page) <= 0) {
         $page = 1;
     }
     $tpl = $this->load("history");
     $log = "";
     $tpl_log = $this->T_preg_match($tpl, '~\\[history\\](.*?)\\[/history\\]~is');
     $tpl_log_null = $this->T_preg_match($tpl, '~\\[not_history\\](.*?)\\[/not_history\\]~is');
     $tpl_log_date = $this->T_preg_match($tpl_log, '~\\{date=(.*?)\\}~is');
     $this->db_where(array("history_user_name = '{s}' " => $this->member_id['name']));
     $history = $this->db_get_log($page, $this->config['paging']);
     $num_history = $this->db_get_log_num();
     foreach ($history as $history_id => $history_value) {
         $time_log_theme = $tpl_log;
         $time_log_theme = str_replace("{date=" . $tpl_log_date . "}", langdate($tpl_log_date, $history_value['history_date']), $time_log_theme);
         $time_log_theme = str_replace("{comment}", $history_value['history_text'], $time_log_theme);
         $time_log_theme = str_replace("{balance}", $history_value['history_balance'] . " " . $this->pay_api->bf_declOfNum($history_value['history_balance']), $time_log_theme);
         $time_log_theme = str_replace("{summa}", $history_value['history_plus'] ? "<font color=\"green\">+" . $history_value['history_plus'] . " " . $history_value['history_currency'] . "</font>" : "<font color=\"red\">-" . $history_value['history_minus'] . " " . $history_value['history_currency'] . "</font>", $time_log_theme);
         $log .= $time_log_theme;
     }
     /* Paging */
     if ($num_history > $this->config['paging']) {
         $tpl_log_page = $this->T_preg_match($tpl, '~\\[paging\\](.*?)\\[/paging\\]~is');
         $tpl_log_page_link = $this->T_preg_match($tpl, '~\\[page_link\\](.*?)\\[/page_link\\]~is');
         $tpl_log_page_this = $this->T_preg_match($tpl, '~\\[page_this\\](.*?)\\[/page_this\\]~is');
         $tpl_log_page = preg_replace("'\\[page_link\\].*?\\[/page_link\\]'si", $this->pay_api->bf_paging($num_history, $page, $this->config_dle['http_home_url'] . $this->config['page'] . ".html/log/main/{p}", $tpl_log_page_link, $tpl_log_page_this), $tpl_log_page);
         $tpl_log_page = preg_replace("'\\[page_this\\].*?\\[/page_this\\]'si", "", $tpl_log_page);
         $this->set_element_block("paging", $tpl_log_page);
     } else {
         $this->set_element_block("paging", "");
     }
     /* LOG NULL */
     if ($log) {
         $this->set_element_block("not_history", "");
     } else {
         $this->set_element_block("not_history", $tpl_log_null);
     }
     $this->set_element_block("history", $log);
     $this->set_element("{content}", $tpl);
     return $this->load("cabinet");
 }
开发者ID:Nurik4249,项目名称:DLE-Billing,代码行数:46,代码来源:user.log.php

示例2: select


//.........这里部分代码省略.........
                            }
                            if ($row_vote['answer_num'] <= 1) {
                                $answer_text2 = 'Проголосовал';
                            } else {
                                $answer_text2 = 'Проголосовало';
                            }
                            $attach_result .= "{$answer_text2} <b>{$row_vote['answer_num']}</b> {$answer_num_text}.<div class=\"clear\" style=\"margin-top:10px\"></div></div>";
                        }
                    } else {
                        $attach_result .= '';
                    }
                }
                if ($resLinkTitle and $row_wall['text'] == $resLinkUrl or !$row_wall['text']) {
                    $row_wall['text'] = $resLinkTitle . $attach_result;
                } else {
                    if ($attach_result) {
                        $row_wall['text'] = preg_replace('`(http(?:s)?://\\w+[^\\s\\[\\]\\<]+)`i', '<a href="/away.php?url=$1" target="_blank">$1</a>', $row_wall['text']) . $attach_result;
                    } else {
                        $row_wall['text'] = preg_replace('`(http(?:s)?://\\w+[^\\s\\[\\]\\<]+)`i', '<a href="/away.php?url=$1" target="_blank">$1</a>', $row_wall['text']);
                    }
                }
            } else {
                $row_wall['text'] = preg_replace('`(http(?:s)?://\\w+[^\\s\\[\\]\\<]+)`i', '<a href="/away.php?url=$1" target="_blank">$1</a>', $row_wall['text']);
            }
            $resLinkTitle = '';
            //Если это запись с "рассказать друзьям"
            if ($row_wall['tell_uid']) {
                if ($row_wall['public']) {
                    $rowUserTell = $db->super_query("SELECT title, photo FROM `" . PREFIX . "_communities` WHERE id = '{$row_wall['tell_uid']}'");
                } else {
                    $rowUserTell = $db->super_query("SELECT user_search_pref, user_photo FROM `" . PREFIX . "_users` WHERE user_id = '{$row_wall['tell_uid']}'");
                }
                if (date('Y-m-d', $row_wall['tell_date']) == date('Y-m-d', $server_time)) {
                    $dateTell = langdate('сегодня в H:i', $row_wall['tell_date']);
                } elseif (date('Y-m-d', $row_wall['tell_date']) == date('Y-m-d', $server_time - 84600)) {
                    $dateTell = langdate('вчера в H:i', $row_wall['tell_date']);
                } else {
                    $dateTell = langdate('j F Y в H:i', $row_wall['tell_date']);
                }
                if ($row_wall['public']) {
                    $rowUserTell['user_search_pref'] = stripslashes($rowUserTell['title']);
                    $tell_link = 'public';
                    if ($rowUserTell['photo']) {
                        $avaTell = '/uploads/groups/' . $row_wall['tell_uid'] . '/50_' . $rowUserTell['photo'];
                    } else {
                        $avaTell = '{theme}/images/no_ava_50.png';
                    }
                } else {
                    $tell_link = 'u';
                    if ($rowUserTell['user_photo']) {
                        $avaTell = '/uploads/users/' . $row_wall['tell_uid'] . '/50_' . $rowUserTell['user_photo'];
                    } else {
                        $avaTell = '{theme}/images/no_ava_50.png';
                    }
                }
                if ($row_wall['tell_comm']) {
                    $border_tell_class = 'wall_repost_border';
                } else {
                    $border_tell_class = 'wall_repost_border2';
                }
                $row_wall['text'] = <<<HTML
{$row_wall['tell_comm']}
<div class="{$border_tell_class}">
<div class="wall_tell_info"><div class="wall_tell_ava"><a href="/{$tell_link}{$row_wall['tell_uid']}" onClick="Page.Go(this.href); return false"><img src="{$avaTell}" width="30" /></a></div><div class="wall_tell_name"><a href="/{$tell_link}{$row_wall['tell_uid']}" onClick="Page.Go(this.href); return false"><b>{$rowUserTell['user_search_pref']}</b></a></div><div class="wall_tell_date">{$dateTell}</div></div>{$row_wall['text']}
<div class="clear"></div>
</div>
开发者ID:BGCX067,项目名称:facestor-svn-to-git,代码行数:67,代码来源:wall.public.php

示例3: time

{$lang['message_pm_3']}

[quote]{$text}[/quote]
HTML;
}
$message = $db->safesql($parse->BB_Parse($parse->process(trim($message)), false));
$time = time() + $config['date_adjust'] * 60;
$member_id['name'] = $db->safesql($member_id['name']);
$db->query("INSERT INTO " . USERPREFIX . "_pm (subj, text, user, user_from, date, pm_read, folder) values ('{$lang['message_pm']}', '{$message}', '{$row['user_id']}', '{$member_id['name']}', '{$time}', 'no', 'inbox')");
$db->query("UPDATE " . USERPREFIX . "_users SET pm_all=pm_all+1, pm_unread=pm_unread+1  WHERE user_id='{$row['user_id']}'");
if ($config['mail_pm']) {
    include_once ENGINE_DIR . '/classes/mail.class.php';
    $mail = new dle_mail($config);
    $mail_template = $db->super_query("SELECT template FROM " . PREFIX . "_email WHERE name='pm' LIMIT 0,1");
    $mail_template['template'] = stripslashes($mail_template['template']);
    $mail_template['template'] = str_replace("{%username%}", $row['name'], $mail_template['template']);
    $mail_template['template'] = str_replace("{%date%}", langdate("j F Y H:i", $time), $mail_template['template']);
    $mail_template['template'] = str_replace("{%fromusername%}", $member_id['name'], $mail_template['template']);
    $mail_template['template'] = str_replace("{%title%}", $lang['message_pm'], $mail_template['template']);
    $body = str_replace('\\n', "", $message);
    $body = str_replace('\\r', "", $body);
    $body = str_replace('&quot;', '"', $message);
    $body = stripslashes(stripslashes($body));
    $body = str_replace("<br />", "\n", $body);
    $body = strip_tags($body);
    $mail_template['template'] = str_replace("{%text%}", $body, $mail_template['template']);
    $mail->send($row['email'], $lang['mail_pm'], $mail_template['template']);
}
@header("Content-type: text/html; charset=" . $config['charset']);
echo "ok";
开发者ID:Zzepish,项目名称:IvanShikalovWebSIte,代码行数:30,代码来源:message.php

示例4: cal

function cal($cal_month, $cal_year, $events)
{
    global $f, $r, $year, $month, $config, $lang, $langdateshortweekdays, $PHP_SELF;
    $next = true;
    if (intval($cal_year . $cal_month) >= date('Ym') and !$config['news_future']) {
        $next = false;
    }
    $cur_date = date('Ymj', time());
    $cal_date = $cal_year . $cal_month;
    $cal_month = intval($cal_month);
    $cal_year = intval($cal_year);
    if ($cal_month < 0) {
        $cal_month = 1;
    }
    if ($cal_year < 0) {
        $cal_year = 2008;
    }
    $first_of_month = mktime(0, 0, 0, $cal_month, 7, $cal_year);
    $maxdays = date('t', $first_of_month) + 1;
    // 28-31
    $prev_of_month = mktime(0, 0, 0, $cal_month - 1, 7, $cal_year);
    $next_of_month = mktime(0, 0, 0, $cal_month + 1, 7, $cal_year);
    $cal_day = 1;
    $weekday = date('w', $first_of_month);
    // 0-6
    if ($config['allow_alt_url']) {
        $date_link['prev'] = '<a class="monthlink" onclick="doCalendar(' . date("'m','Y'", $prev_of_month) . ',\'right\'); return false;" href="' . $config['http_home_url'] . date('Y/m/', $prev_of_month) . '" title="' . $lang['prev_moth'] . '">&laquo;</a>&nbsp;&nbsp;&nbsp;&nbsp;';
        $date_link['next'] = '&nbsp;&nbsp;&nbsp;&nbsp;<a class="monthlink" onclick="doCalendar(' . date("'m','Y'", $next_of_month) . ',\'left\'); return false;" href="' . $config['http_home_url'] . date('Y/m/', $next_of_month) . '" title="' . $lang['next_moth'] . '">&raquo;</a>';
    } else {
        $date_link['prev'] = '<a class="monthlink" onclick="doCalendar(' . date("'m','Y'", $prev_of_month) . ',\'right\'); return false;" href="' . $PHP_SELF . '?year=' . date("Y", $prev_of_month) . '&amp;month=' . date("m", $prev_of_month) . '" title="' . $lang['prev_moth'] . '">&laquo;</a>&nbsp;&nbsp;&nbsp;&nbsp;';
        $date_link['next'] = '&nbsp;&nbsp;&nbsp;&nbsp;<a class="monthlink" onclick="doCalendar(' . date("'m','Y'", $next_of_month) . ',\'left\'); return false;" href="' . $PHP_SELF . '?year=' . date("Y", $next_of_month) . '&amp;month=' . date("m", $next_of_month) . '" title="' . $lang['next_moth'] . '">&raquo;</a>';
    }
    if (!$next) {
        $date_link['next'] = "&nbsp;&nbsp;&nbsp;&nbsp;&raquo;";
    }
    $buffer = '<table id="calendar" class="calendar"><tr><th colspan="7" class="monthselect">' . $date_link['prev'] . langdate('F', $first_of_month, true) . ' ' . $cal_year . $date_link['next'] . '</th></tr><tr>';
    $buffer = str_replace($f, $r, $buffer);
    # Дни недели: рабочая неделя
    for ($it = 1; $it < 6; $it++) {
        $buffer .= '<th class="workday">' . $langdateshortweekdays[$it] . '</th>';
    }
    # Дни недели: субботний и воскресный дни
    $buffer .= '<th class="weekday">' . $langdateshortweekdays[6] . '</th>';
    $buffer .= '<th class="weekday">' . $langdateshortweekdays[0] . '</th>';
    $buffer .= '</tr><tr>';
    if ($weekday > 0) {
        $buffer .= '<td colspan="' . $weekday . '">&nbsp;</td>';
    }
    while ($maxdays > $cal_day) {
        $cal_pos = $cal_date . $cal_day;
        if ($weekday == 7) {
            $buffer .= '</tr><tr>';
            $weekday = 0;
        }
        # В данный день есть новость
        if (isset($events[$cal_day])) {
            $date['title'] = langdate('d F Y', $events[$cal_day], true);
            # Если суббота и воскресенье.
            if ($weekday == '5' or $weekday == '6') {
                if ($config['allow_alt_url']) {
                    $buffer .= '<td ' . ($cal_pos == $cur_date ? ' class="day-active day-current" ' : ' class="day-active" ') . '><a class="day-active" href="' . $config['http_home_url'] . '' . date("Y/m/d", $events[$cal_day]) . '/" title="' . $lang['cal_post'] . ' ' . $date['title'] . '">' . $cal_day . '</a></td>';
                } else {
                    $buffer .= '<td ' . ($cal_pos == $cur_date ? ' class="day-active day-current" ' : ' class="day-active" ') . '><a class="day-active" href="' . $PHP_SELF . '?year=' . date("Y", $events[$cal_day]) . '&amp;month=' . date("m", $events[$cal_day]) . '&day=' . date("d", $events[$cal_day]) . '" title="' . $lang['cal_post'] . ' ' . $date['title'] . '">' . $cal_day . '</a></td>';
                }
            } else {
                if ($config['allow_alt_url']) {
                    $buffer .= '<td ' . ($cal_pos == $cur_date ? ' class="day-active-v day-current" ' : ' class="day-active-v" ') . '><a class="day-active-v" href="' . $config['http_home_url'] . '' . date("Y/m/d", $events[$cal_day]) . '/" title="' . $lang['cal_post'] . ' ' . $date['title'] . '">' . $cal_day . '</a></td>';
                } else {
                    $buffer .= '<td ' . ($cal_pos == $cur_date ? ' class="day-active-v day-current" ' : ' class="day-active-v" ') . '><a class="day-active-v" href="' . $PHP_SELF . '?year=' . date("Y", $events[$cal_day]) . '&amp;month=' . date("m", $events[$cal_day]) . '&day=' . date("d", $events[$cal_day]) . '" title="' . $lang['cal_post'] . ' ' . $date['title'] . '">' . $cal_day . '</a></td>';
                }
            }
        } else {
            # Если суббота воскресенье
            if ($weekday == "5" or $weekday == "6") {
                $buffer .= '<td ' . ($cal_pos == $cur_date ? ' class="weekday day-current" ' : ' class="weekday" ') . '>' . $cal_day . '</td>';
            } else {
                $buffer .= '<td ' . ($cal_pos == $cur_date ? ' class="day day-current" ' : ' class="day" ') . '>' . $cal_day . '</td>';
            }
        }
        $cal_day++;
        $weekday++;
    }
    if ($weekday != 7) {
        $buffer .= '<td colspan="' . (7 - $weekday) . '">&nbsp;</td>';
    }
    return $buffer . '</tr></table>';
}
开发者ID:Gordondalos,项目名称:union,代码行数:87,代码来源:calendar.php

示例5: array

\t\t\t\$(".no_company").fadeOut();
\t});
\t
\tif (\$("#company").val() != '')
\t\t\$(".no_company").fadeOut();
});
</script>
JS;
$tpl->header($job->lang['vacancies'], true, $JS, array($config['http_home_url'] . 'engine/job/images/admin/jquery.autocomplete.css'), array($config['http_home_url'] . 'engine/job/javascript/jquery.metadata.js', $config['http_home_url'] . 'engine/job/javascript/jquery.validate.js', $config['http_home_url'] . 'engine/job/javascript/messages_ru.js'));
if (empty($where)) {
    $tpl->echo = FALSE;
    if ($edit['id']) {
        $data[] = array('', "<b>ID</b>" . $edit['id']);
    }
    if ($edit['add_date']) {
        $data[] = array($job->lang['vacancy_added'], langdate('j F Yã. â H:i', $edit['add_date']));
    }
    $data[] = array($job->lang['sphere'], $tpl->selection($job->GetSpheres('add'), 'sphere_id', $edit['sphere_id'], 'id="sphere_id"'));
    //	$data[] = array($job->lang['specialty'], $tpl->selection($job->GetSpecialties($edit['sphere_id']), 'specialty_id', $edit['specialty_id'], 'id="specialty_id"'));
    $data[] = array($job->lang['specialty'], $tpl->InputText('specialty', empty($edit['sphere_id']) ? $job->lang['sel_sphere'] : $edit['specialty'], 'id="specialty"'));
    if ($job->use_country) {
        $data[] = array($job->lang['country'], $tpl->selection($job->GetCountries('add'), 'country_id', $edit['country_id'], "id='country_id'"));
    }
    if ($job->use_city) {
        $data[] = array($job->lang['city'], $tpl->selection($job->GetCities($edit['country_id']), 'city_id', $edit['city_id'], "id='city_id'"));
    }
    foreach (Vacancy::$fields as $field_name => $values_array) {
        $data[] = array($job->lang[$field_name], $tpl->selection(array("" => $job->lang['no_show']) + $values_array, $field_name, $edit[$field_name]));
    }
    $data[] = array($job->lang['sex'], $tpl->selection(array(0 => $job->lang['no_show'], "M" => $job->lang['sex_man'], "W" => $job->lang['sex_woman']), 'sex', $edit['sex']));
    $data[] = array($job->lang['age'], $job->lang['from'] . $tpl->InputText('age_min', $edit['age_min'], 'size=10') . $job->lang['to'] . $tpl->InputText('age_max', $edit['age_max'], 'size=10'));
开发者ID:dautushenka,项目名称:Job_Centre,代码行数:31,代码来源:vacancies.php

示例6: while

 $tpl->set('{news_main}', $stats_main);
 $tpl->set('{news_moder}', $stats_news - $stats_approve);
 $tpl->set('{news_day}', $stats_day);
 $tpl->set('{news_week}', $stats_week);
 $tpl->set('{news_month}', $stats_month);
 $tpl->set('{comm_day}', $comments_day);
 $tpl->set('{comm_week}', $comments_week);
 $tpl->set('{comm_month}', $comments_month);
 $tpl->set('{user_day}', $user_day);
 $tpl->set('{user_week}', $user_week);
 $tpl->set('{user_month}', $user_month);
 $db->query("SELECT user_id, name, user_group, reg_date, lastdate, news_num, comm_num FROM " . USERPREFIX . "_users WHERE news_num > '0' ORDER BY news_num DESC LIMIT 0,10");
 $top_table = "<thead><tr><td>{$lang['top_name']}</td><td align=\"center\">{$lang['top_status']}</td><td align=\"center\">{$lang['top_reg']}</td><td align=\"center\">{$lang['top_last']}</td><td align=\"center\">{$lang['top_nnum']}</td><td align=\"center\">{$lang['top_cnum']}</td><td align=\"center\">{$lang['top_pm']}</td></tr></thead>";
 while ($row = $db->get_row()) {
     $registration = langdate($config['timestamp_active'], $row['reg_date']);
     $last = langdate($config['timestamp_active'], $row['lastdate']);
     if ($config['allow_alt_url']) {
         $user_name = $config['http_home_url'] . "user/" . urlencode($row['name']) . "/";
         $user_name = "onclick=\"ShowProfile('" . urlencode($row['name']) . "', '" . htmlspecialchars($user_name, ENT_QUOTES, $config['charset']) . "', '" . $user_group[$member_id['user_group']]['admin_editusers'] . "'); return false;\"";
         $user_name = "<a {$user_name} class=\"pm_list\" href=\"" . $config['http_home_url'] . "user/" . urlencode($row['name']) . "/\">" . $row['name'] . "</a>";
     } else {
         $user_name = "{$PHP_SELF}?subaction=userinfo&user=" . urlencode($row['name']);
         $user_name = "onclick=\"ShowProfile('" . urlencode($row['name']) . "', '" . htmlspecialchars($user_name, ENT_QUOTES, $config['charset']) . "', '" . $user_group[$member_id['user_group']]['admin_editusers'] . "'); return false;\"";
         $user_name = "<a {$user_name} class=\"pm_list\" href=\"{$PHP_SELF}?subaction=userinfo&amp;user=" . urlencode($row['name']) . "\">" . $row['name'] . "</a>";
     }
     $user_pm = "<a href=\"{$PHP_SELF}?do=pm&amp;doaction=newpm&amp;user=" . $row['user_id'] . "\">{$lang['top_pm']}</a>";
     $top_table .= "<tr><td>{$user_name}</td><td align=\"center\">{$user_group[$row['user_group']]['group_prefix']}{$user_group[$row['user_group']]['group_name']}{$user_group[$row['user_group']]['group_suffix']}</td><td align=\"center\">{$registration}</td><td align=\"center\">{$last}</td><td align=\"center\">{$row['news_num']}</td><td align=\"center\">{$row['comm_num']}</td><td align=\"center\">[ {$user_pm} ]</td></tr>";
 }
 $db->free();
 $tpl->set('{topusers}', $top_table);
 $tpl->compile('content');
开发者ID:Gordondalos,项目名称:union,代码行数:31,代码来源:stats.php

示例7: date

             $full_link = $config['http_home_url'] . date('Y/m/d/', $row['date']) . $row['alt_name'] . ".html";
         }
     } else {
         $full_link = $config['http_home_url'] . "index.php?newsid=" . $row['id'];
     }
     $title = stripslashes($row['title']);
     $row = $db->super_query("SELECT * FROM " . PREFIX . "_email WHERE name='comments' LIMIT 0,1");
     $mail = new dle_mail($config, $row['use_html']);
     if (strpos($full_link, "//") === 0) {
         $full_link = "http:" . $full_link;
     } elseif (strpos($full_link, "/") === 0) {
         $full_link = "http://" . $_SERVER['HTTP_HOST'] . $full_link;
     }
     $row['template'] = stripslashes($row['template']);
     $row['template'] = str_replace("{%username%}", $name, $row['template']);
     $row['template'] = str_replace("{%date%}", langdate("j F Y H:i", $_TIME, true), $row['template']);
     $row['template'] = str_replace("{%link%}", $full_link, $row['template']);
     $row['template'] = str_replace("{%title%}", $title, $row['template']);
     $body = str_replace('\\n', "", $comments);
     $body = str_replace('\\r', "", $body);
     $body = stripslashes(stripslashes($body));
     $body = str_replace("<br />", "\n", $body);
     $body = strip_tags($body);
     if ($row['use_html']) {
         $body = str_replace("\n", "<br />", $body);
     }
     $row['template'] = str_replace("{%text%}", $body, $row['template']);
 }
 if ($config['mail_comments']) {
     $body = str_replace("{%ip%}", $_IP, $row['template']);
     $body = str_replace("{%username_to%}", $lang['admin'], $body);
开发者ID:Gordondalos,项目名称:union,代码行数:31,代码来源:addcomments.php

示例8: md5

 }
 if (count(explode("@", $row['foto'])) == 2) {
     $tpl->set('{foto}', 'http://www.gravatar.com/avatar/' . md5(trim($row['foto'])) . '?s=' . intval($user_group[$row['user_group']]['max_foto']));
 } else {
     if ($row['foto'] and file_exists(ROOT_DIR . "/uploads/fotos/" . $row['foto'])) {
         $tpl->set('{foto}', $config['http_home_url'] . "uploads/fotos/" . $row['foto']);
     } else {
         $tpl->set('{foto}', "{THEME}/dleimages/noavatar.png");
     }
 }
 if ($row['banned'] == 'yes') {
     $user_group[$row['user_group']]['group_name'] = $lang['user_ban'];
 }
 $tpl->set('{status}', $user_group[$row['user_group']]['group_prefix'] . $user_group[$row['user_group']]['group_name'] . $user_group[$row['user_group']]['group_suffix']);
 $tpl->set('{registration}', langdate("j F Y H:i", $row['reg_date']));
 $tpl->set('{lastdate}', langdate("j F Y H:i", $row['lastdate']));
 if ($row['lastdate'] + 1200 > $_TIME) {
     $tpl->set('[online]', "");
     $tpl->set('[/online]', "");
     $tpl->set_block("'\\[offline\\](.*?)\\[/offline\\]'si", "");
 } else {
     $tpl->set('[offline]', "");
     $tpl->set('[/offline]', "");
     $tpl->set_block("'\\[online\\](.*?)\\[/online\\]'si", "");
 }
 if ($row['fullname']) {
     $tpl->set('[fullname]', "");
     $tpl->set('[/fullname]', "");
     $tpl->set('{fullname}', stripslashes($row['fullname']));
     $tpl->set_block("'\\[not-fullname\\](.*?)\\[/not-fullname\\]'si", "");
 } else {
开发者ID:Zzepish,项目名称:IvanShikalovWebSIte,代码行数:31,代码来源:profile.php

示例9: date

 if ($i != 0) {
     $opener = "\t</ul>\n";
     $openertwo = "</li>";
 } else {
     $opener = "";
     $opener2 = "";
 }
 # Monthly headers
 if ($dateheader_S != date("mY", $date)) {
     if ($num_months && $ma > $num_months) {
         break 1;
     }
     $m_amount = $mc;
     $mc = 0;
     $dateheader_S = date("mY", $date);
     $dateheader = langdate("F Y", $date);
     $dateheader_p = "{$openertwo}\n{$opener}\n<h1>{month}</h1>\n\t<ul class=\"ajforkmonthlist\">";
     $dateheader_p = str_replace("{month}", $dateheader, $dateheader_p);
     echo $dateheader_p;
     $ma++;
 }
 if ($entrydayofmonth == date("d", $date)) {
     $multiple = 1;
     echo "<strong> , </strong>{$archivelink}";
 } else {
     if ($mc == 0) {
         $openertwo = "";
     }
     $daysingle = date("d", $date);
     echo "{$openertwo}\n\t\t<li><strong>{$daysingle}</strong>: {$archivelink}";
 }
开发者ID:BackupTheBerlios,项目名称:ajfork-svn,代码行数:31,代码来源:show_archives.php

示例10: md5

         $tpl->set('{foto}', 'http://www.gravatar.com/avatar/' . md5(trim($row['foto'])) . '?s=' . intval($user_group[$row['user_group']]['max_foto']));
     } else {
         if ($row['foto']) {
             $tpl->set('{foto}', $config['http_home_url'] . "uploads/fotos/" . $row['foto']);
         } else {
             $tpl->set('{foto}', "{THEME}/dleimages/noavatar.png");
         }
     }
 }
 if ($row['is_register'] and $row['icq']) {
     $tpl->set('{icq}', stripslashes($row['icq']));
 } else {
     $tpl->set('{icq}', '--');
 }
 if ($row['is_register']) {
     $tpl->set('{registration}', langdate("d.m.Y", $row['reg_date']));
 } else {
     $tpl->set('{registration}', '--');
 }
 if ($row['is_register'] and $row['news_num']) {
     $tpl->set('{news_num}', $row['news_num']);
 } else {
     $tpl->set('{news_num}', '0');
 }
 if ($row['is_register'] and $row['comm_num']) {
     $tpl->set('{comm_num}', $row['comm_num']);
 } else {
     $tpl->set('{comm_num}', '0');
 }
 $tpl->set_block("'\\[signature\\](.*?)\\[/signature\\]'si", "");
 $tpl->set('{result-text}', "<div id='comm-id-" . $row['coms_id'] . "'>" . $row['story'] . "</div>");
开发者ID:Zzepish,项目名称:IvanShikalovWebSIte,代码行数:31,代码来源:search.php

示例11: mozg_clear_cache_file

         } else {
             //Всталвяем саму запись в БД
             $db->query("INSERT INTO `" . PREFIX . "_communities_forum_msg` SET fid = '{$fid}', muser_id = '{$user_id}', msg = '{$msg}', mdate = '{$server_time}'");
             $dbid = $db->insert_id();
         }
         mozg_clear_cache_file("groups_forum/forum{$row['public_id']}");
         //Обновляем данные в теме
         $db->query("UPDATE `" . PREFIX . "_communities_forum` SET msg_num = msg_num+1, lastdate = '{$server_time}', lastuser_id = '{$user_id}' WHERE fid = '{$fid}'");
         $tpl->load_template('forum/msg.tpl');
         $msg = preg_replace('`(http(?:s)?://\\w+[^\\s\\[\\]\\<]+)`i', '<a href="/away.php?url=$1" target="_blank">$1</a>', $msg);
         $tpl->set('{text}', stripslashes($msg));
         $tpl->set('{name}', $user_info['user_search_pref']);
         $tpl->set('{online}', $lang['online']);
         $tpl->set('{mid}', $dbid);
         $tpl->set('{user-id}', $user_info['user_id']);
         $tpl->set('{date}', langdate('сегодня в H:i', $server_time));
         $tpl->set('[admin-2]', '');
         $tpl->set('[/admin-2]', '');
         $tpl->set_block("'\\[not-owner\\](.*?)\\[/not-owner\\]'si", "");
         if ($user_info['user_photo']) {
             $tpl->set('{ava}', "/uploads/users/{$user_info['user_id']}/50_{$user_info['user_photo']}");
         } else {
             $tpl->set('{ava}', '{theme}/images/no_ava_50.png');
         }
         $tpl->compile('content');
         AjaxTpl();
     }
     exit;
     break;
     //################### Показах предыдущих сообщений ###################//
 //################### Показах предыдущих сообщений ###################//
开发者ID:skypach,项目名称:skypach.ru,代码行数:31,代码来源:groups_forum.php

示例12: langdate

     }
 }
 $resLinkTitle = '';
 //Если это запись с "рассказать друзьям"
 if ($rec_info_groups['tell_uid']) {
     if ($rec_info_groups['public']) {
         $rowUserTell = $db->super_query("SELECT title, photo FROM `" . PREFIX . "_communities` WHERE id = '{$rec_info_groups['tell_uid']}'");
     } else {
         $rowUserTell = $db->super_query("SELECT user_search_pref, user_photo FROM `" . PREFIX . "_users` WHERE user_id = '{$rec_info_groups['tell_uid']}'");
     }
     if (date('Y-m-d', $rec_info_groups['tell_date']) == date('Y-m-d', $server_time)) {
         $dateTell = langdate('сегодня в H:i', $rec_info_groups['tell_date']);
     } elseif (date('Y-m-d', $rec_info_groups['tell_date']) == date('Y-m-d', $server_time - 84600)) {
         $dateTell = langdate('вчера в H:i', $rec_info_groups['tell_date']);
     } else {
         $dateTell = langdate('j F Y в H:i', $rec_info_groups['tell_date']);
     }
     if ($rec_info_groups['public']) {
         $rowUserTell['user_search_pref'] = stripslashes($rowUserTell['title']);
         $tell_link = 'public';
         if ($rowUserTell['photo']) {
             $avaTell = '/uploads/groups/' . $rec_info_groups['tell_uid'] . '/50_' . $rowUserTell['photo'];
         } else {
             $avaTell = '{theme}/images/no_ava_50.png';
         }
     } else {
         $tell_link = 'u';
         if ($rowUserTell['user_photo']) {
             $avaTell = '/uploads/users/' . $rec_info_groups['tell_uid'] . '/50_' . $rowUserTell['user_photo'];
         } else {
             $avaTell = '{theme}/images/no_ava_50.png';
开发者ID:BGCX067,项目名称:facestor-svn-to-git,代码行数:31,代码来源:news.php

示例13: echohtmlstart

  <option value="0"></option>
  {$selsorlist}
 </select>
<div class="mgcler"></div>

<div class="fllogall">&nbsp;</div>
 <input type="submit" value="Найти" class="inp" style="margin-top:0px" />

</form>
HTML;
echohtmlstart('Список пользователей (' . $numRows['cnt'] . ')');
foreach ($sql_ as $row) {
    $format_reg_date = date('Y-m-d', $row['user_reg_date']);
    $lastvisit = date('Y-m-d', $row['user_last_visit']);
    $row['user_reg_date'] = langdate('j M Y в H:i', $row['user_reg_date']);
    $row['user_last_visit'] = langdate('j M Y в H:i', $row['user_last_visit']);
    if ($row['user_delet']) {
        $color = 'color:red';
    } else {
        if ($row['user_ban']) {
            $color = 'color:blue';
        } else {
            if ($row['user_group'] == 4) {
                $color = 'color:green';
            } else {
                $color = '';
            }
        }
    }
    $users .= <<<HTML
<div style="background:#fff;float:left;padding:5px;width:170px;text-align:center;font-weight:bold;" title="Баланс: {$row['user_balance']} голосов"><a href="/u{$row['user_id']}" target="_blank" style="{$color}">{$row['user_search_pref']}</a></div>
开发者ID:BGCX067,项目名称:facestor-svn-to-git,代码行数:31,代码来源:users.php

示例14: formdate

 function formdate($matches = array())
 {
     global $news_date;
     return langdate($matches[1], $news_date);
 }
开发者ID:Banych,项目名称:SiteCreate,代码行数:5,代码来源:preview.php

示例15: Start


//.........这里部分代码省略.........
                     } else {
                         if ($this->config['version_id'] >= '10.5') {
                             if (strpos($row['foto'], "//") === 0) {
                                 $avatar = "http:" . $row['foto'];
                             } else {
                                 $avatar = $row['foto'];
                             }
                             $avatar = @parse_url($avatar);
                             if ($avatar['host']) {
                                 $tpl->set('{foto}', $row['foto']);
                             } else {
                                 $tpl->set('{foto}', $this->config['http_home_url'] . "uploads/fotos/" . $row['foto']);
                             }
                         } else {
                             if ($row['foto'] and file_exists(ROOT_DIR . "/uploads/fotos/" . $row['foto'])) {
                                 $tpl->set('{foto}', $this->config['http_home_url'] . "uploads/fotos/" . $row['foto']);
                             }
                         }
                     }
                 } else {
                     $tpl->set('{foto}', "{THEME}/dleimages/noavatar.png");
                 }
                 // Обработка ссылки автора комментария
                 if ($allow_alt_url) {
                     $user_url = $this->config['http_home_url'] . "user/" . urlencode($row['autor']) . "/";
                 } else {
                     $user_url = "{$PHP_SELF}?subaction=userinfo&amp;user=" . urlencode($row['autor']);
                 }
                 if ($row['is_register'] != 1) {
                     $user_url = 'mailto:' . $row['email'];
                 }
                 // Обработка даты комментария
                 if (date('Ymd', $row['date']) == date('Ymd', $_TIME)) {
                     $tpl->set('{date}', $lang['time_heute'] . langdate(", H:i", $row['date']));
                 } elseif (date('Ymd', $row['date']) == date('Ymd', $_TIME - 86400)) {
                     $tpl->set('{date}', $lang['time_gestern'] . langdate(", H:i", $row['date']));
                 } else {
                     $tpl->set('{date}', langdate($this->config['timestamp_active'], $row['date']));
                 }
                 $tpl->copy_template = preg_replace("#\\{date=(.+?)\\}#ie", "langdate('\\1', '{$row['date']}')", $tpl->copy_template);
                 $tpl->set('{text}', $text);
                 //текст комментария
                 $tpl->set('{user_url}', $user_url);
                 // ссылка на автора
                 $tpl->set('{user_name}', $row['autor']);
                 // просто ник автора
                 $tpl->set('[user_url]', "<a href=\"" . $user_url . "\">");
                 // оборачиваем в ссылку
                 $tpl->set('[/user_url]', "</a>");
                 // оборачиваем в ссылку
                 $tpl->set('{author}', $author);
                 // автор с ссылкой на профиль с модальным окном
                 $tpl->set('[color]', $this->group[$row['user_group']]['group_prefix']);
                 // префикс цвета группы
                 $tpl->set('[/color]', $this->group[$row['user_group']]['group_suffix']);
                 // суфикс цвета группы
                 $tpl->set('{title}', $title);
                 // укороченный заголовок
                 $tpl->set('{long_title}', stripslashes($row['title']));
                 // полный заголовок
                 $tpl->set('{rating}', $row['rating']);
                 // рейтинг новости
                 $tpl->set('{views}', $row['news_read']);
                 // просмотров новости
                 $tpl->set('{full_link}', $full_link);
                 // линк на комментарий
开发者ID:hiptc,项目名称:ShowComments,代码行数:67,代码来源:comm.php


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