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


PHP create_date函数代码示例

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


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

示例1: cms_block_user_block

 function cms_block_user_block()
 {
     global $db, $cache, $config, $template, $user, $lang;
     /*
     if($user->data['session_logged_in'])
     {
     	$sql = "SELECT COUNT(post_id) as total
     		FROM " . POSTS_TABLE . "
     		WHERE post_time >= " . $user->data['user_lastvisit'] . " AND poster_id <> " . $user->data['user_id'] . " AND post_time < " . time();
     	$db->sql_return_on_error(true);
     	$result = $db->sql_query($sql);
     	$db->sql_return_on_error(false);
     	if($result)
     	{
     		$row = $db->sql_fetchrow($result);
     		$lang['Search_new'] = $lang['Search_new'] . "&nbsp;(" . $row['total'] . ")";
     		$db->sql_freeresult($result);
     	}
     }
     */
     // Check For Anonymous User
     if ($user->data['user_id'] != ANONYMOUS) {
         $name_link = colorize_username($user->data['user_id'], $user->data['username'], $user->data['user_color'], $user->data['user_active']);
         $avatar_img = user_get_avatar($user->data['user_id'], $user->data['user_level'], $user->data['user_avatar'], $user->data['user_avatar_type'], $user->data['user_allowavatar']);
     } else {
         $name_link = $lang['Guest'];
         $avatar_img = '<img src="' . $config['default_avatar_guests_url'] . '" alt="" />';
     }
     $s_last_visit = create_date($config['default_dateformat'], $user->data['user_lastvisit'], $config['board_timezone']);
     $template->assign_vars(array('U_PORTAL_NOSID' => CMS_PAGE_HOME, 'AVATAR_IMG' => $avatar_img, 'U_NAME_LINK' => $name_link, 'LAST_VISIT_DATE' => sprintf($lang['You_last_visit'], $s_last_visit), 'L_REMEMBER_ME' => $lang['Remember_me'], 'L_SEND_PASSWORD' => $lang['Forgotten_password'], 'U_SEND_PASSWORD' => append_sid(CMS_PAGE_PROFILE . '?mode=sendpassword'), 'L_REGISTER_NEW_ACCOUNT' => sprintf($lang['Register_new_account'], '<a href="' . append_sid(CMS_PAGE_PROFILE . '?mode=register') . '">', '</a>'), 'L_NEW_SEARCH' => $lang['Search_new']));
 }
开发者ID:ALTUN69,项目名称:icy_phoenix,代码行数:31,代码来源:user_block.php

示例2: recup_liste_scores

    function recup_liste_scores($limit = 15)
    {
        global $db;
        $sql = 'SELECT s.* ,u.user_id, u.username, u.user_avatar_type, u.user_allowavatar, u.user_avatar 
				FROM ' . AREABB_SCORES_TABLE . ' as s 
				LEFT JOIN ' . USERS_TABLE . ' as u 
				ON s.user_id = u.user_id 
				WHERE s.game_id = ' . $this->gid . ' 
				ORDER BY s.score_game DESC, s.score_date ASC 
				LIMIT 0,' . $limit;
        if (!($result = $db->sql_query($sql))) {
            message_die(GENERAL_ERROR, "Impossible d\\acceder à la tables des scrores", '', __LINE__, __FILE__, $sql);
        }
        $i = 1;
        $score_precedent = -999999;
        $position_precedente = 0;
        while ($row = $db->sql_fetchrow($result)) {
            // On compare le score actuel avec le score précédent
            if ($row['score_game'] == $score_precedent) {
                $position = $position_precedente;
            } else {
                $position++;
                $position_precedente = $position;
            }
            $this->liste_score[$i]['position'] = $position;
            $this->liste_score[$i]['avatar'] = $this->affiche_avatar($row['user_avatar_type'], $row['user_allowavatar'], $row['user_avatar']);
            $this->liste_score[$i]['username'] = $row['username'];
            $this->liste_score[$i]['user_id'] = $row['user_id'];
            $this->liste_score[$i]['score'] = $row['score_game'];
            $this->liste_score[$i]['date'] = create_date($board_config['default_dateformat'], $row['score_date'], $board_config['board_timezone']);
            $i++;
        }
        return true;
    }
开发者ID:Nekrofage,项目名称:FJR,代码行数:34,代码来源:class_jeux.php

示例3: __construct

 public function __construct()
 {
     global $template, $db, $board_config, $phpbb_seo, $lang;
     global $rcs, $get, $qte;
     $template->assign_vars(array('MARQUEE_TOPIC' => str_replace("%s", $board_config['topics_on_index'], $lang['marquee_topic'])));
     if (!($result = $db->sql_query($this->getFetchSql(), false, 'topics_recent_'))) {
         message_die(GENERAL_ERROR, 'Could not query recent posts marquee information', '', __LINE__, __FILE__);
     }
     if ($rows = $db->sql_fetchrowset($result)) {
         $db->sql_freeresult($result);
     }
     $topics = count($rows) <= $board_config['topics_on_index'] ? count($rows) : $board_config['topics_on_index'];
     for ($i = 0; $i < $topics; ++$i) {
         $topic = $rows[$i];
         $mar_title = $topic["topic_title"];
         // www.phpBB-SEO.com SEO TOOLKIT BEGIN
         if (!isset($phpbb_seo->seo_url['topic'][$topic['topic_id']])) {
             $phpbb_seo->seo_url['topic'][$topic['topic_id']] = $phpbb_seo->format_url($mar_title);
         }
         // www.phpBB-SEO.com SEO TOOLKIT END
         $mar_url = $get->url('viewtopic', array(POST_TOPIC_URL => $topic["topic_id"]));
         $mar_user = $topic["username"];
         $pic = pic_for_topic($topic);
         if ($board_config['allow_smilies']) {
             $topic["topic_title"] = smilies_pass($topic["topic_title"]);
         }
         $topic_title = $topic['topic_title'];
         $qte->attr($topic_title, $topic['topic_attribute']);
         $template->assign_block_vars('marqueerow', array('FOLD_URL' => $pic, 'TOPIC_TITLE' => $topic_title, 'TOPIC_URL' => $get->url('viewtopic', array(POST_TOPIC_URL => $topic["topic_id"]), true), 'POST_URL' => $get->url('viewtopic', array('p' => $topic["post_id"]), true) . '#' . $topic["post_id"], 'STYLE' => $rcs->get_colors($topic), 'USERNAME' => $topic["username"], 'USER_PROF' => $get->url('userlist', array('mode' => 'viewprofile', POST_USERS_URL => $topic["user_id"]), true), 'POST_DATE' => create_date($board_config['default_dateformat'], $topic["post_time"], $board_config['board_timezone'])));
     }
 }
开发者ID:Nekrofage,项目名称:FJR,代码行数:31,代码来源:recent_topics.php

示例4: dateNavigator

function dateNavigator($week_no = null)
{
    if (empty($week_no)) {
        $week_no = date_format(create_date(), 'W');
    }
    return '<table border="1px" align="center" cellpadding="5px>" style="font:bold;background:#ccc"' . '<tr><td><a href="week.php?week=prior">Предыдущая' . ($week_no - 1) . '</a></td>' . '<td><a href="week.php?week=current">Текущая' . $week_no . '</a></td>' . '<td><a href="week.php?week=next">Следующая' . ($week_no + 1) . '</a></td>' . '</tr>' . '</table>';
}
开发者ID:viljinsky,项目名称:schedule2,代码行数:7,代码来源:proc.php

示例5: rotary_pre_user_import

 function rotary_pre_user_import($userdata, $usermeta)
 {
     $usermeta['email'] = $userdata['user_email'];
     $userdata['role'] = 'member';
     $usermeta['memberyesno'] = '1';
     $membersince = date_format(create_date($usermeta['membersince']), 'm/d/Y');
     $usermeta['membersince'] = $membersince ? $membersince : '01/01/2015';
     $userdata['display_name'] = $userdata['first_name'] . ' ' . $userdata['last_name'];
 }
开发者ID:nmedia82,项目名称:rotary,代码行数:9,代码来源:theme-functions.php

示例6: generate_user_info

function generate_user_info(&$row, $date_format, $group_mod, &$from, &$posts, &$joined, &$poster_avatar, &$profile_img, &$profile, &$search_img, &$search, &$pm_img, &$pm, &$email_img, &$email, &$www_img, &$www, &$icq_status_img, &$icq_img, &$icq, &$aim_img, &$aim, &$msn_img, &$msn, &$yim_img, &$yim)
{
    global $lang, $images, $board_config, $phpEx;
    $from = !empty($row['user_from']) ? $row['user_from'] : '&nbsp;';
    $joined = create_date($date_format, $row['user_regdate'], $board_config['board_timezone']);
    $posts = $row['user_posts'] ? $row['user_posts'] : 0;
    $poster_avatar = '';
    if ($row['user_avatar_type'] && $row['user_id'] != ANONYMOUS && $row['user_allowavatar']) {
        switch ($row['user_avatar_type']) {
            case USER_AVATAR_UPLOAD:
                $poster_avatar = $board_config['allow_avatar_upload'] ? '<img src="' . $board_config['avatar_path'] . '/' . $row['user_avatar'] . '" alt="" border="0" />' : '';
                break;
            case USER_AVATAR_REMOTE:
                $poster_avatar = $board_config['allow_avatar_remote'] ? '<img src="' . $row['user_avatar'] . '" alt="" border="0" />' : '';
                break;
            case USER_AVATAR_GALLERY:
                $poster_avatar = $board_config['allow_avatar_local'] ? '<img src="' . $board_config['avatar_gallery_path'] . '/' . $row['user_avatar'] . '" alt="" border="0" />' : '';
                break;
        }
    }
    if (!empty($row['user_viewemail']) || $group_mod) {
        $email_uri = $board_config['board_email_form'] ? append_sid("profile.{$phpEx}?mode=email&amp;" . POST_USERS_URL . '=' . $row['user_id']) : 'mailto:' . $row['user_email'];
        $email_img = '<a href="' . $email_uri . '"><img src="' . $images['icon_email'] . '" alt="' . $lang['Send_email'] . '" title="' . $lang['Send_email'] . '" border="0" /></a>';
        $email = '<a href="' . $email_uri . '">' . $lang['Send_email'] . '</a>';
    } else {
        $email_img = '&nbsp;';
        $email = '&nbsp;';
    }
    $temp_url = append_sid("profile.{$phpEx}?mode=viewprofile&amp;" . POST_USERS_URL . "=" . $row['user_id']);
    $profile_img = '<a href="' . $temp_url . '"><img src="' . $images['icon_profile'] . '" alt="' . $lang['Read_profile'] . '" title="' . $lang['Read_profile'] . '" border="0" /></a>';
    $profile = '<a href="' . $temp_url . '">' . $lang['Read_profile'] . '</a>';
    $temp_url = append_sid("privmsg.{$phpEx}?mode=post&amp;" . POST_USERS_URL . "=" . $row['user_id']);
    $pm_img = '<a href="' . $temp_url . '"><img src="' . $images['icon_pm'] . '" alt="' . $lang['Send_private_message'] . '" title="' . $lang['Send_private_message'] . '" border="0" /></a>';
    $pm = '<a href="' . $temp_url . '">' . $lang['Send_private_message'] . '</a>';
    $www_img = $row['user_website'] ? '<a href="' . $row['user_website'] . '" target="_userwww"><img src="' . $images['icon_www'] . '" alt="' . $lang['Visit_website'] . '" title="' . $lang['Visit_website'] . '" border="0" /></a>' : '';
    $www = $row['user_website'] ? '<a href="' . $row['user_website'] . '" target="_userwww">' . $lang['Visit_website'] . '</a>' : '';
    if (!empty($row['user_icq'])) {
        $icq_status_img = '<a href="http://wwp.icq.com/' . $row['user_icq'] . '#pager"><img src="http://web.icq.com/whitepages/online?icq=' . $row['user_icq'] . '&img=5" width="18" height="18" border="0" /></a>';
        $icq_img = '<a href="http://wwp.icq.com/scripts/search.dll?to=' . $row['user_icq'] . '"><img src="' . $images['icon_icq'] . '" alt="' . $lang['ICQ'] . '" title="' . $lang['ICQ'] . '" border="0" /></a>';
        $icq = '<a href="http://wwp.icq.com/scripts/search.dll?to=' . $row['user_icq'] . '">' . $lang['ICQ'] . '</a>';
    } else {
        $icq_status_img = '';
        $icq_img = '';
        $icq = '';
    }
    $aim_img = $row['user_aim'] ? '<a href="aim:goim?screenname=' . $row['user_aim'] . '&amp;message=Hello+Are+you+there?"><img src="' . $images['icon_aim'] . '" alt="' . $lang['AIM'] . '" title="' . $lang['AIM'] . '" border="0" /></a>' : '';
    $aim = $row['user_aim'] ? '<a href="aim:goim?screenname=' . $row['user_aim'] . '&amp;message=Hello+Are+you+there?">' . $lang['AIM'] . '</a>' : '';
    $temp_url = append_sid("profile.{$phpEx}?mode=viewprofile&amp;" . POST_USERS_URL . "=" . $row['user_id']);
    $msn_img = $row['user_msnm'] ? '<a href="' . $temp_url . '"><img src="' . $images['icon_msnm'] . '" alt="' . $lang['MSNM'] . '" title="' . $lang['MSNM'] . '" border="0" /></a>' : '';
    $msn = $row['user_msnm'] ? '<a href="' . $temp_url . '">' . $lang['MSNM'] . '</a>' : '';
    $yim_img = $row['user_yim'] ? '<a href="http://edit.yahoo.com/config/send_webmesg?.target=' . $row['user_yim'] . '&amp;.src=pg"><img src="' . $images['icon_yim'] . '" alt="' . $lang['YIM'] . '" title="' . $lang['YIM'] . '" border="0" /></a>' : '';
    $yim = $row['user_yim'] ? '<a href="http://edit.yahoo.com/config/send_webmesg?.target=' . $row['user_yim'] . '&amp;.src=pg">' . $lang['YIM'] . '</a>' : '';
    $temp_url = append_sid("search.{$phpEx}?search_author=" . urlencode($row['username']) . "&amp;showresults=posts");
    $search_img = '<a href="' . $temp_url . '"><img src="' . $images['icon_search'] . '" alt="' . sprintf($lang['Search_user_posts'], $row['username']) . '" title="' . sprintf($lang['Search_user_posts'], $row['username']) . '" border="0" /></a>';
    $search = '<a href="' . $temp_url . '">' . sprintf($lang['Search_user_posts'], $row['username']) . '</a>';
    return;
}
开发者ID:ZerGabriel,项目名称:adr-rpg,代码行数:57,代码来源:groupcp.php

示例7: main

 function main($action)
 {
     global $template, $pafiledb_config, $debug, $lang, $config, $theme, $images;
     $template->assign_vars(array('L_HOME' => $lang['Home'], 'CURRENT_TIME' => sprintf($lang['Current_time'], create_date($config['default_dateformat'], time(), $config['board_timezone'])), 'TPL_COLOR' => $theme['body_background'], 'U_INDEX_HOME' => append_sid(CMS_PAGE_HOME), 'U_DOWNLOAD' => append_sid('dload.' . PHP_EXT), 'CAT_BLOCK_IMG' => $images['category_block'], 'SPACER' => $images['spacer'], 'DOWNLOAD' => $pafiledb_config['settings_dbname'], 'TREE' => $menu_output));
     //===================================================
     // Show the Category for the download database index
     //===================================================
     $this->category_display();
     $this->display($lang['Download'], 'pa_main_body.tpl');
 }
开发者ID:ALTUN69,项目名称:icy_phoenix,代码行数:10,代码来源:pa_main.php

示例8: cms_block_sh_visit_counter

 function cms_block_sh_visit_counter()
 {
     global $db, $config, $template, $lang;
     $sql = "SELECT SUM(reg + hidden + guests) as total\n\t\t\tFROM " . SITE_HISTORY_TABLE;
     $result = $db->sql_query($sql);
     $row = $db->sql_fetchrow($result);
     $db->sql_freeresult($result);
     $visit_counter = $row['total'];
     $template->assign_vars(array('VISIT_COUNTER' => sprintf($lang['SH_Visit_counter_statement'], $visit_counter, create_date($config['default_dateformat'], $config['board_startdate'], $config['board_timezone'])), 'L_VISIT_COUNTER' => $lang['Visit_counter']));
 }
开发者ID:ALTUN69,项目名称:icy_phoenix,代码行数:10,代码来源:sh_visit_counter.php

示例9: process

 function process($data, $config)
 {
     $messageID = md5(time() . rand(1000, 1000000) . time());
     if ($config['x_test_request'] == "TRUE") {
         $merchantID = "XYZ0010";
         $merchantPW = "abcd1234";
     } else {
         $merchantID = $config['merchant_id'];
         $merchantPW = $config['password'];
     }
     $myTransactionData = $this->set_array($data, $config);
     $xmlRequest = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>";
     $xmlRequest .= "<NABTransactMessage>";
     $xmlRequest .= "<MessageInfo>";
     $xmlRequest .= "<messageID>" . $messageID . "</messageID>";
     $xmlRequest .= "<messageTimestamp>" . create_date() . "</messageTimestamp>";
     $xmlRequest .= "<timeoutValue>60</timeoutValue>";
     $xmlRequest .= "<apiVersion>xml-4.2</apiVersion>";
     $xmlRequest .= "</MessageInfo>";
     $xmlRequest .= "<MerchantInfo>";
     $xmlRequest .= "<merchantID>" . $merchantID . "</merchantID>";
     $xmlRequest .= "<password>" . $merchantPW . "</password>";
     $xmlRequest .= "</MerchantInfo>";
     $xmlRequest .= "<RequestType>Payment</RequestType>";
     $xmlRequest .= "<Payment>";
     $xmlRequest .= '<TxnList count="1">';
     $xmlRequest .= '<Txn ID="1">';
     foreach ($myTransactionData as $key => $value) {
         $xmlRequest .= "<{$key}>{$value}</{$key}>";
     }
     $xmlRequest .= "<CreditCardInfo>";
     $xmlRequest .= "<cardNumber>" . $data['nab_cc_num'] . "</cardNumber>";
     $xmlRequest .= "<expiryDate>" . $data['nab_cc_month'] . '/' . $data['nab_cc_year'] . "</expiryDate>";
     $xmlRequest .= "</CreditCardInfo>";
     $xmlRequest .= "</Txn>";
     $xmlRequest .= "</TxnList>";
     $xmlRequest .= "</Payment>";
     $xmlRequest .= "</NABTransactMessage>";
     $xmlResponse = $this->sendTransactionToNab($xmlRequest, $config['x_test_request']);
     if ($xmlResponse != "") {
         $responseFields = simplexml_load_string($xmlResponse);
         $responseArray = objectsIntoArray($responseFields);
     }
     if (trim($responseArray['Payment']['TxnList']['Txn']['responseCode']) != "00") {
         $trans = array('error' => $responseArray['Payment']['TxnList']['Txn']['responseText']);
     } else {
         $details = array("Method" => "NAB", "Approval Code" => $responseArray['Payment']['TxnList']['Txn']['responseCode'], "Transaction ID" => $responseArray['Payment']['TxnList']['Txn']['txnID'], "Transaction Ref" => $data['transaction_id'], "Transaction Info" => $responseArray['Payment']['TxnList']['Txn']['responseText']);
         // Return the trans details
         $trans = array('status' => 3, 'transaction_id' => $responseArray['Payment']['TxnList']['Txn']['txnID'], 'payment_type' => 'NAB', 'amount' => $data["order_total"], 'details' => serialize($details), 'approval' => $responseArray['Payment']['TxnList']['Txn']['responseCode']);
     }
     return $trans;
 }
开发者ID:ebeauchamps,项目名称:brilliantretail,代码行数:52,代码来源:gateway.nab_transact.php

示例10: imp_recent_topics_block_func

 function imp_recent_topics_block_func()
 {
     global $template, $portal_config, $userdata, $board_config, $db, $phpEx;
     $sql = "SELECT * FROM " . FORUMS_TABLE . " ORDER BY forum_id";
     if (!($result1 = $db->sql_query($sql))) {
         message_die(GENERAL_ERROR, 'Could not query forums information', '', __LINE__, __FILE__, $sql);
     }
     $forum_data = array();
     while ($row1 = $db->sql_fetchrow($result1)) {
         $forum_data[] = $row1;
     }
     $is_auth_ary = array();
     $is_auth_ary = auth(AUTH_ALL, AUTH_LIST_ALL, $userdata, $forum_data);
     if (empty($portal_config['md_except_forum_id'])) {
         $except_forum_id = '\'start\'';
     } else {
         $except_forum_id = $portal_config['md_except_forum_id'];
     }
     for ($i = 0; $i < count($forum_data); $i++) {
         if (!$is_auth_ary[$forum_data[$i]['forum_id']]['auth_read'] or !$is_auth_ary[$forum_data[$i]['forum_id']]['auth_view']) {
             if ($except_forum_id == '\'start\'') {
                 $except_forum_id = $forum_data[$i]['forum_id'];
             } else {
                 $except_forum_id .= ',' . $forum_data[$i]['forum_id'];
             }
         }
     }
     if ($portal_config['md_approve_mod_installed']) {
         $sql = "SELECT t.topic_id, t.topic_title, t.topic_last_post_id, t.forum_id, p.post_id, p.poster_id, p.post_time, u.user_id, u.username\n\t\t\t\tFROM " . TOPICS_TABLE . " AS t LEFT OUTER JOIN " . APPROVE_POSTS_TABLE . " AS a ON (t.topic_first_post_id = a.post_id), " . POSTS_TABLE . " AS p, " . USERS_TABLE . " AS u\n\t\t\t\tWHERE t.forum_id NOT IN (" . $except_forum_id . ")\n\t\t\t\t\tAND t.topic_status <> 2\n\t\t\t\t\tAND p.post_id = t.topic_last_post_id\n\t\t\t\t\tAND p.poster_id = u.user_id\n\t\t\t\t\tAND a.post_id is NULL\n\t\t\t\tORDER BY p.post_id DESC\n\t\t\t\tLIMIT " . $portal_config['md_num_recent_topics'];
     } else {
         $sql = "SELECT t.topic_id, t.topic_title, t.topic_last_post_id, t.forum_id, p.post_id, p.poster_id, p.post_time, u.user_id, u.username\n\t\t\t\tFROM " . TOPICS_TABLE . " AS t, " . POSTS_TABLE . " AS p, " . USERS_TABLE . " AS u\n\t\t\t\tWHERE t.forum_id NOT IN (" . $except_forum_id . ")\n\t\t\t\t\tAND t.topic_status <> 2\n\t\t\t\t\tAND p.post_id = t.topic_last_post_id\n\t\t\t\t\tAND p.poster_id = u.user_id\n\t\t\t\tORDER BY p.post_id DESC\n\t\t\t\tLIMIT " . $portal_config['md_num_recent_topics'];
     }
     if (!($result1 = $db->sql_query($sql))) {
         message_die(GENERAL_ERROR, 'Could not query recent topics information', '', __LINE__, __FILE__, $sql);
     }
     $number_recent_topics = $db->sql_numrows($result1);
     $recent_topic_row = array();
     while ($row1 = $db->sql_fetchrow($result1)) {
         $recent_topic_row[] = $row1;
     }
     if ($portal_config['md_recent_topics_style']) {
         $style_row = 'scroll';
     } else {
         $style_row = 'static';
     }
     $template->assign_block_vars($style_row, "");
     for ($i = 0; $i < $number_recent_topics; $i++) {
         $template->assign_block_vars($style_row . '.recent_topic_row', array('U_TITLE' => append_sid("viewtopic.{$phpEx}?" . POST_POST_URL . '=' . $recent_topic_row[$i]['post_id']) . '#' . $recent_topic_row[$i]['post_id'], 'L_TITLE' => $recent_topic_row[$i]['topic_title'], 'U_POSTER' => append_sid("profile.{$phpEx}?mode=viewprofile&amp;" . POST_USERS_URL . "=" . $recent_topic_row[$i]['user_id']), 'S_POSTER' => $recent_topic_row[$i]['username'], 'S_POSTTIME' => create_date($board_config['default_dateformat'], $recent_topic_row[$i]['post_time'], $board_config['board_timezone'])));
     }
 }
开发者ID:BackupTheBerlios,项目名称:phpbbsfp,代码行数:50,代码来源:blocks_imp_recent_topics.php

示例11: generate_user_info

function generate_user_info(&$row, $date_format, $group_mod, &$from, &$posts, &$joined, &$poster_avatar, &$profile_img, &$profile, &$search_img, &$search, &$pm_img, &$pm, &$email_img, &$email, &$www_img, &$www, &$icq_status_img, &$icq_img, &$icq)
{
    global $lang, $images, $ft_cfg;
    $from = !empty($row['user_from']) ? $row['user_from'] : '&nbsp;';
    $joined = create_date($date_format, $row['user_regdate'], $ft_cfg['board_timezone']);
    $posts = $row['user_posts'] ? $row['user_posts'] : 0;
    $poster_avatar = '';
    if ($row['user_avatar_type'] && $row['user_id'] != GUEST_UID && $row['user_allowavatar']) {
        switch ($row['user_avatar_type']) {
            case USER_AVATAR_UPLOAD:
                $poster_avatar = $ft_cfg['allow_avatar_upload'] ? '<img src="' . $ft_cfg['avatar_path'] . '/' . $row['user_avatar'] . '" alt="" border="0" />' : '';
                break;
            case USER_AVATAR_REMOTE:
                $poster_avatar = $ft_cfg['allow_avatar_remote'] ? '<img src="' . $row['user_avatar'] . '" alt="" border="0" />' : '';
                break;
            case USER_AVATAR_GALLERY:
                $poster_avatar = $ft_cfg['allow_avatar_local'] ? '<img src="' . $ft_cfg['avatar_gallery_path'] . '/' . $row['user_avatar'] . '" alt="" border="0" />' : '';
                break;
        }
    }
    if (!empty($row['user_viewemail']) || $group_mod) {
        $email_uri = $ft_cfg['board_email_form'] ? append_sid("profile.php?mode=email&amp;" . POST_USERS_URL . '=' . $row['user_id']) : 'mailto:' . $row['user_email'];
        $email_img = '<a href="' . $email_uri . '"><img src="' . $images['icon_email'] . '" alt="' . $lang['Send_email'] . '" title="' . $lang['Send_email'] . '" border="0" /></a>';
        $email = '<a href="' . $email_uri . '">' . $lang['Send_email'] . '</a>';
    } else {
        $email_img = '&nbsp;';
        $email = '&nbsp;';
    }
    $temp_url = append_sid("profile.php?mode=viewprofile&amp;" . POST_USERS_URL . "=" . $row['user_id']);
    $profile_img = '<a href="' . $temp_url . '"><img src="' . $images['icon_profile'] . '" alt="' . $lang['Read_profile'] . '" title="' . $lang['Read_profile'] . '" border="0" /></a>';
    $profile = '<a href="' . $temp_url . '">' . $lang['Read_profile'] . '</a>';
    $temp_url = append_sid("privmsg.php?mode=post&amp;" . POST_USERS_URL . "=" . $row['user_id']);
    $pm_img = '<a href="' . $temp_url . '"><img src="' . $images['icon_pm'] . '" alt="' . $lang['Send_private_message'] . '" title="' . $lang['Send_private_message'] . '" border="0" /></a>';
    $pm = '<a href="' . $temp_url . '">' . $lang['Send_private_message'] . '</a>';
    $www_img = $row['user_website'] ? '<a href="' . $row['user_website'] . '" target="_userwww"><img src="' . $images['icon_www'] . '" alt="' . $lang['Visit_website'] . '" title="' . $lang['Visit_website'] . '" border="0" /></a>' : '';
    $www = $row['user_website'] ? '<a href="' . $row['user_website'] . '" target="_userwww">' . $lang['Visit_website'] . '</a>' : '';
    if (!empty($row['user_icq'])) {
        $icq_status_img = '<a href="http://wwp.icq.com/' . $row['user_icq'] . '#pager"><img src="http://web.icq.com/whitepages/online?icq=' . $row['user_icq'] . '&img=5" width="18" height="18" border="0" /></a>';
        $icq_img = '<a href="http://wwp.icq.com/scripts/search.dll?to=' . $row['user_icq'] . '"><img src="' . $images['icon_icq'] . '" alt="' . $lang['ICQ'] . '" title="' . $lang['ICQ'] . '" border="0" /></a>';
        $icq = '<a href="http://wwp.icq.com/scripts/search.dll?to=' . $row['user_icq'] . '">' . $lang['ICQ'] . '</a>';
    } else {
        $icq_status_img = '';
        $icq_img = '';
        $icq = '';
    }
    $temp_url = append_sid("search.php?search_author=" . urlencode($username) . "&amp;showresults=posts");
    $search_img = '<a href="' . $temp_url . '"><img src="' . $images['icon_search'] . '" alt="' . $lang['Search_user_posts'] . '" title="' . $lang['Search_user_posts'] . '" border="0" /></a>';
    $search = '<a href="' . $temp_url . '">' . $lang['Search_user_posts'] . '</a>';
    return;
}
开发者ID:forummaks,项目名称:forum_maks,代码行数:50,代码来源:groupcp.php

示例12: viewmain

/**
* FUNCTIONS
*/
function viewmain($per_page)
{
    global $portal_config, $db, $config, $template, $SID, $_SID, $user, $auth, $phpEx, $phpbb_root_path;
    $user->add_lang('lang_meeting');
    //
    // Recent Comments ver 2
    //
    global $portal_config, $db, $config, $template, $SID, $_SID, $user, $auth, $phpEx, $phpbb_root_path;
    $user->add_lang('lang_meeting');
    $sql = "SELECT d.meeting_subject, d.meeting_last_comm, d.meeting_id, COUNT(d.meeting_id) AS counts, d.meeting_user_last_comm, d.meeting_lastcomm_id, m.meeting_id as meet, m.meeting_edit_time, m.comment_id as number, m.user_id as user, d.meeting_comment as text, u.username, u.user_id \n\t\t\tFROM " . MEETING_DATA_TABLE . " AS d\n\t\t\t\tLEFT JOIN " . MEETING_COMMENT_TABLE . " AS m ON d.meeting_id = m.meeting_id\n\t\t\t\tLEFT JOIN " . USERS_TABLE . " AS u ON  d.meeting_user_last_comm = u.user_id\n\t\t\tWHERE d.meeting_last_comm <> 0\n\t\t\tREGEXP '^[--]'\t\n\t\t\tGROUP BY d.meeting_id\n\t\t\tORDER BY d.meeting_last_comm DESC\n\t\t\tLIMIT 5";
    if (!($result = $db->sql_query($sql))) {
        message_die(GENERAL_ERROR, 'Could not query comments information', '', __LINE__, __FILE__, $sql);
    }
    $comment_data = array();
    $total_comments = 0;
    while ($row = $db->sql_fetchrow($result)) {
        if ($meetings_access_ids[$row['meeting_id']] == TRUE || $userdata['user_level'] == ADMIN) {
            $comment_data[] = $row;
            $total_comments++;
        }
    }
    $db->sql_freeresult($result);
    for ($i = 0; $i < $total_comments; $i++) {
        $comment_count = $comment_data[$i]['counts'];
        if ($userdata['user_comment_num'] != 0) {
            $comm_str = floor($comment_count / $userdata['user_comment_num']);
            $ostatok = $comment_count - $comm_str * $userdata['user_comment_num'];
            $ostatok = $ostatok == 0 ? 1 : $ostatok;
            $start = '&amp;start=' . ($comment_count - $ostatok);
        } else {
            $start = '&amp;start=0';
        }
        $comment_time = create_date($portal_config['default_dateformat'], $comment_data[$i]['meeting_last_comm'], $portal_config['board_timezone']);
        $comment_user = $user->lang['Write'] . ' <a href="' . append_sid('profile.' . $phpEx . '?mode=viewprofile&amp;' . POST_USERS_URL . '=' . $comment_data[$i]['user_id']) . '" class="nav" target="_blank">' . $comment_data[$i]['username'] . '</a>';
        $comment_meeting = $comment_data[$i]['meeting_id'];
        $comment_name = $comment_data[$i]['meeting_subject'];
        $comm_url = 'meeting.' . $phpEx . '?mode=detail&amp;id=' . $comment_meeting . $start . '#' . $comment_data[$i]['meeting_lastcomm_id'];
        $comment_name = '<a href="' . $comm_url . '" class="nav">' . $comment_name . '</a>';
        $text = stripslashes($comment_data[$i]['text']);
        // Output the values
        $template->assign_block_vars('last_comment', array('COMMENT_NAME' => $comment_name, 'COMMENT_COUNT' => $comment_count, 'COMMENT_USER' => $comment_user, 'COMMENT_TIME' => $comment_time, 'COMMENT_MEETING' => $comment_meeting, 'COMMENT_TEXT' => $text));
    }
    //
    // END - Recent Comments
    //
}
开发者ID:velocat,项目名称:phpbb3,代码行数:49,代码来源:functions_pokat.php

示例13: AddScheduler

function AddScheduler()
{
    include_once 'install/install_utils.php';
    require_once 'modules/Schedulers/Scheduler.php';
    $scheduler = new Scheduler();
    $scheduler->retrieve_by_string_fields(array('job' => 'function::processAOW_Workflow'));
    if ($scheduler->id == '') {
        $scheduler->name = 'Run AOW WorkFlow';
        $scheduler->job = 'function::processAOW_Workflow';
        $scheduler->date_time_start = create_date(2005, 1, 1) . ' ' . create_time(0, 0, 1);
        $scheduler->date_time_end = create_date(2020, 12, 31) . ' ' . create_time(23, 59, 59);
        $scheduler->job_interval = '*::*::*::*::*';
        $scheduler->status = 'Active';
        $scheduler->created_by = '1';
        $scheduler->modified_user_id = '1';
        $scheduler->catch_up = '0';
        $scheduler->save();
    }
}
开发者ID:BMLP,项目名称:memoryhole-ansible,代码行数:19,代码来源:AdvancedOpenWorkflow.php

示例14: scrape_flora

function scrape_flora($plant)
{
    $id = $plant->getId();
    $date = create_date($plant->getCreated());
    $name = $plant->getName();
    $location = $plant->getLocation();
    $longitude = $plant->getLongitude();
    $latitude = $plant->getLatitude();
    $user_id = $plant->getUserId();
    //$weather_id= $plant->getWeatherId();
    $weather = $plant->getWeather();
    //$soil_id= $plant->getSoilId();
    $soil = $plant->getSoil();
    $temperature = $plant->getTemperature();
    $wind = $plant->getWind();
    $humidity = $plant->getHumidity();
    $notes = $plant->getNotes();
    return array($id, $date, $name, $location, $longitude, $latitude, $user_id, $weather, $soil, $temperature, $wind, $humidity, $notes);
}
开发者ID:darrenhankins,项目名称:weblab-flora-app,代码行数:19,代码来源:export.php

示例15: main

    function main($action)
    {
        global $template, $lang, $config, $pafiledb_config, $db, $user, $pafiledb_functions, $pafiledb_user;
        $file_id = request_var('file_id', 0);
        if (empty($file_id)) {
            message_die(GENERAL_MESSAGE, $lang['File_not_exist']);
        }
        $rating = request_post_var('rating', 0);
        $sql = 'SELECT file_name, file_catid
			FROM ' . PA_FILES_TABLE . "\n\t\t\tWHERE file_id = {$file_id}";
        $result = $db->sql_query($sql);
        if (!($file_data = $db->sql_fetchrow($result))) {
            message_die(GENERAL_MESSAGE, $lang['File_not_exist']);
        }
        $db->sql_freeresult($result);
        if (!$this->auth[$file_data['file_catid']]['auth_rate']) {
            if (!$user->data['session_logged_in']) {
                redirect(append_sid(CMS_PAGE_LOGIN . '?redirect=dload.' . PHP_EXT . '&action=rate&file_id=' . $file_id, true));
            }
            $message = sprintf($lang['Sorry_auth_rate'], $this->auth[$file_data['file_catid']]['auth_rate_type']);
            message_die(GENERAL_MESSAGE, $message);
        }
        $this->generate_category_nav($file_data['file_catid']);
        $template->assign_vars(array('L_INDEX' => sprintf($lang['Forum_Index'], $config['sitename']), 'L_RATE' => $lang['Rate'], 'L_HOME' => $lang['Home'], 'CURRENT_TIME' => sprintf($lang['Current_time'], create_date($config['default_dateformat'], time(), $config['board_timezone'])), 'U_INDEX_HOME' => append_sid(CMS_PAGE_HOME), 'U_DOWNLOAD_HOME' => append_sid('dload.' . PHP_EXT), 'U_FILE_NAME' => append_sid('dload.' . PHP_EXT . '?action=file&amp;file_id=' . $file_id), 'FILE_NAME' => $file_data['file_name'], 'DOWNLOAD' => $pafiledb_config['settings_dbname']));
        if (isset($_POST['submit'])) {
            $result_msg = str_replace("{filename}", $file_data['file_name'], $lang['Rconf']);
            $result_msg = str_replace("{rate}", $rating, $result_msg);
            if ($rating <= 0 or $rating > 10) {
                message_die(GENERAL_ERROR, 'Bad submited value');
            }
            $pafiledb_user->update_voter_info($file_id, $rating);
            $rate_info = $pafiledb_functions->get_rating($file_id);
            $result_msg = str_replace("{newrating}", $rate_info, $result_msg);
            $message = $result_msg . '<br /><br />' . sprintf($lang['Click_return'], '<a href="' . append_sid('dload.' . PHP_EXT . '?action=file&amp;file_id=' . $file_id) . '">', '</a>') . '<br /><br />' . sprintf($lang['Click_return_forum'], '<a href="' . append_sid('index.' . PHP_EXT) . '">', '</a>');
            message_die(GENERAL_MESSAGE, $message);
        } else {
            $rate_info = str_replace("{filename}", $file_data['file_name'], $lang['Rateinfo']);
            $template->assign_vars(array('S_RATE_ACTION' => append_sid('dload.' . PHP_EXT . '?action=rate&amp;file_id=' . $file_id), 'L_RATE' => $lang['Rate'], 'L_RERROR' => $lang['Rerror'], 'L_R1' => $lang['R1'], 'L_R2' => $lang['R2'], 'L_R3' => $lang['R3'], 'L_R4' => $lang['R4'], 'L_R5' => $lang['R5'], 'L_R6' => $lang['R6'], 'L_R7' => $lang['R7'], 'L_R8' => $lang['R8'], 'L_R9' => $lang['R9'], 'L_R10' => $lang['R10'], 'RATEINFO' => $rate_info, 'ID' => $file_id));
        }
        $this->display($lang['Download'], 'pa_rate_body.tpl');
    }
开发者ID:ALTUN69,项目名称:icy_phoenix,代码行数:41,代码来源:pa_rate.php


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