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


PHP qa_path_absolute函数代码示例

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


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

示例1: process_request

 public function process_request($request)
 {
     if ($request == 'facebook-login') {
         $app_id = qa_opt('facebook_app_id');
         $app_secret = qa_opt('facebook_app_secret');
         $tourl = qa_get('to');
         if (!strlen($tourl)) {
             $tourl = qa_path_absolute('');
         }
         if (strlen($app_id) && strlen($app_secret)) {
             require_once $this->directory . 'facebook.php';
             $facebook = new Facebook(array('appId' => $app_id, 'secret' => $app_secret, 'cookie' => true));
             $fb_userid = $facebook->getUser();
             if ($fb_userid) {
                 try {
                     $user = $facebook->api('/me?fields=email,name,verified,location,website,about,picture.width(250)');
                     if (is_array($user)) {
                         qa_log_in_external_user('facebook', $fb_userid, array('email' => @$user['email'], 'handle' => @$user['name'], 'confirmed' => @$user['verified'], 'name' => @$user['name'], 'location' => @$user['location']['name'], 'website' => @$user['website'], 'about' => @$user['bio'], 'avatar' => strlen(@$user['picture']['data']['url']) ? qa_retrieve_url($user['picture']['data']['url']) : null));
                     }
                 } catch (FacebookApiException $e) {
                 }
             } else {
                 qa_redirect_raw($facebook->getLoginUrl(array('redirect_uri' => $tourl)));
             }
         }
         qa_redirect_raw($tourl);
     }
 }
开发者ID:amiyasahu,项目名称:question2answer,代码行数:28,代码来源:qa-facebook-login-page.php

示例2: login_html

 public function login_html($tourl, $context)
 {
     $app_id = qa_opt('facebook_app_id');
     if (!strlen($app_id)) {
         return;
     }
     $this->facebook_html(qa_path_absolute('facebook-login', array('to' => $tourl)), false, $context);
 }
开发者ID:swuit,项目名称:swuit-q2a,代码行数:8,代码来源:qa-facebook-login.php

示例3: qa_start_reset_user

function qa_start_reset_user($userid)
{
    require_once QA_INCLUDE_DIR . 'qa-db-users.php';
    require_once QA_INCLUDE_DIR . 'qa-app-options.php';
    require_once QA_INCLUDE_DIR . 'qa-app-emails.php';
    require_once QA_INCLUDE_DIR . 'qa-db-selects.php';
    qa_db_user_set($userid, 'emailcode', qa_db_user_rand_emailcode());
    $userinfo = qa_db_select_with_pending(qa_db_user_account_selectspec($userid, true));
    if (!qw_send_notification($userid, $userinfo['email'], $userinfo['handle'], qa_lang('emails/reset_subject'), nl2br(qa_lang('emails/reset_body')), array('^code' => $userinfo['emailcode'], '^url' => qa_path_absolute('reset', array('c' => $userinfo['emailcode'], 'e' => $userinfo['email']))))) {
        qa_fatal_error('Could not send reset password email');
    }
}
开发者ID:rahularyan,项目名称:dude-theme,代码行数:12,代码来源:overrides.php

示例4: process_request

 function process_request($request)
 {
     @ini_set('display_errors', 0);
     // we don't want to show PHP errors inside XML
     $titlexml = qa_xml(qa_opt('site_title'));
     $template = str_replace('_searchTerms_placeholder_', '{searchTerms}', qa_path_absolute('search', array('q' => '_searchTerms_placeholder_')));
     header('Content-type: text/xml; charset=utf-8');
     echo '<?xml version="1.0" encoding="UTF-8"?>' . "\n";
     echo '<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/" xmlns:moz="http://www.mozilla.org/2006/browser/search/">' . "\n";
     echo "\t<ShortName>" . $titlexml . "</ShortName>\n";
     echo "\t<Description>" . qa_xml(qa_lang('main/search_button')) . ' ' . $titlexml . "</Description>\n";
     echo "\t" . '<Url type="text/html" method="get" template="' . qa_xml($template) . '"/>' . "\n";
     echo "\t<InputEncoding>UTF-8</InputEncoding>\n";
     echo '</OpenSearchDescription>' . "\n";
     return null;
 }
开发者ID:netham91,项目名称:question2answer,代码行数:16,代码来源:qa-opensearch-page.php

示例5: send_default_emails

 function send_default_emails($event, $userid, $handle, $cookieid, $params)
 {
     switch ($event) {
         case 'q_queue':
         case 'q_requeue':
             if (qa_opt('moderate_notify_admin')) {
                 qw_send_notification(null, qa_opt('feedback_email'), null, $event == 'q_requeue' ? qa_lang('emails/remoderate_subject') : qa_lang('emails/moderate_subject'), $event == 'q_requeue' ? nl2br(qa_lang('emails/remoderate_body')) : nl2br(qa_lang('emails/moderate_body')), array('^p_handle' => isset($handle) ? $handle : (strlen($params['name']) ? $params['name'] : (strlen(@$oldquestion['name']) ? $oldquestion['name'] : qa_lang('main/anonymous'))), '^p_context' => trim(@$params['title'] . "\n\n" . $params['text']), '^url' => qa_q_path($params['postid'], $params['title'], true), '^a_url' => qa_path_absolute('admin/moderate')));
             }
             break;
         case 'a_queue':
         case 'a_requeue':
             if (qa_opt('moderate_notify_admin')) {
                 qw_send_notification(null, qa_opt('feedback_email'), null, $event == 'a_requeue' ? qa_lang('emails/remoderate_subject') : qa_lang('emails/moderate_subject'), $event == 'a_requeue' ? nl2br(qa_lang('emails/remoderate_body')) : nl2br(qa_lang('emails/moderate_body')), array('^p_handle' => isset($handle) ? $handle : (strlen($params['name']) ? $params['name'] : (strlen(@$oldanswer['name']) ? $oldanswer['name'] : qa_lang('main/anonymous'))), '^p_context' => $params['text'], '^url' => qa_q_path($params['parentid'], $params['parent']['title'], true, 'A', $params['postid']), '^a_url' => qa_path_absolute('admin/moderate')));
             }
             break;
         case 'c_queue':
         case 'c_requeue':
             if (qa_opt('moderate_notify_admin')) {
                 qw_send_notification(null, qa_opt('feedback_email'), null, $event == 'c_requeue' ? qa_lang('emails/remoderate_subject') : qa_lang('emails/moderate_subject'), $event == 'c_requeue' ? nl2br(qa_lang('emails/remoderate_body')) : nl2br(qa_lang('emails/moderate_body')), array('^p_handle' => isset($handle) ? $handle : (strlen($params['name']) ? $params['name'] : (strlen(@$oldcomment['name']) ? $oldcomment['name'] : (strlen(@$oldanswer['name']) ? $oldanswer['name'] : qa_lang('main/anonymous')))), '^p_context' => $params['text'], '^url' => qa_q_path($params['questionid'], $params['question']['title'], true, 'C', $params['postid']), '^a_url' => qa_path_absolute('admin/moderate')));
             }
             break;
         case 'q_flag':
         case 'a_flag':
         case 'c_flag':
             $flagcount = $params['flagcount'];
             $oldpost = $params['oldpost'];
             $notifycount = $flagcount - qa_opt('flagging_notify_first');
             if ($notifycount >= 0 && $notifycount % qa_opt('flagging_notify_every') == 0) {
                 qw_send_notification(null, qa_opt('feedback_email'), null, qa_lang('emails/flagged_subject'), nl2br(qa_lang('emails/flagged_body')), array('^p_handle' => isset($oldpost['handle']) ? $oldpost['handle'] : (strlen($oldpost['name']) ? $oldpost['name'] : qa_lang('main/anonymous')), '^flags' => $flagcount == 1 ? qa_lang_html_sub('main/1_flag', '1', '1') : qa_lang_html_sub('main/x_flags', $flagcount), '^p_context' => trim(@$oldpost['title'] . "\n\n" . qa_viewer_text($oldpost['content'], $oldpost['format'])), '^url' => qa_q_path($params['questionid'], $params['question']['title'], true, $oldpost['basetype'], $oldpost['postid']), '^a_url' => qa_path_absolute('admin/flagged')));
             }
             break;
         case 'u_register':
             if (qa_opt('register_notify_admin')) {
                 qw_send_notification(null, qa_opt('feedback_email'), null, qa_lang('emails/u_registered_subject'), qa_opt('moderate_users') ? nl2br(qa_lang('emails/u_to_approve_body')) : nl2br(qa_lang('emails/u_registered_body')), array('^u_handle' => $handle, '^url' => qa_path_absolute('user/' . $handle), '^a_url' => qa_path_absolute('admin/approve')));
             }
             break;
     }
 }
开发者ID:rahularyan,项目名称:dude-theme,代码行数:38,代码来源:default-email-notify.php

示例6: process_request

 function process_request($request)
 {
     if ($request == 'facebook-login') {
         $app_id = qa_opt('facebook_app_id');
         $app_secret = qa_opt('facebook_app_secret');
         $tourl = qa_get('to');
         if (!strlen($tourl)) {
             $tourl = qa_path_absolute('');
         }
         if (strlen($app_id) && strlen($app_secret)) {
             if (!function_exists('json_decode')) {
                 // work around fact that PHP might not have JSON extension installed
                 require_once $this->directory . 'JSON.php';
                 function json_decode($json)
                 {
                     $decoder = new Services_JSON(SERVICES_JSON_LOOSE_TYPE);
                     return $decoder->decode($json);
                 }
             }
             require_once $this->directory . 'facebook.php';
             $facebook = new Facebook(array('appId' => $app_id, 'secret' => $app_secret, 'cookie' => true));
             $fb_userid = $facebook->getUser();
             if ($fb_userid) {
                 try {
                     $user = $facebook->api('/me?fields=email,name,verified,location,website,about,picture');
                     if (is_array($user)) {
                         qa_log_in_external_user('facebook', $fb_userid, array('email' => @$user['email'], 'handle' => @$user['name'], 'confirmed' => @$user['verified'], 'name' => @$user['name'], 'location' => @$user['location']['name'], 'website' => @$user['website'], 'about' => @$user['bio'], 'avatar' => strlen(@$user['picture']['data']['url']) ? qa_retrieve_url($user['picture']['data']['url']) : null));
                     }
                 } catch (FacebookApiException $e) {
                 }
             } else {
                 qa_redirect_raw($facebook->getLoginUrl(array('redirect_uri' => $tourl)));
             }
         }
         qa_redirect_raw($tourl);
     }
 }
开发者ID:netham91,项目名称:question2answer,代码行数:37,代码来源:qa-facebook-login-page.php

示例7: qa_mailing_send_one

function qa_mailing_send_one($userid, $handle, $email, $emailcode)
{
    require_once QA_INCLUDE_DIR . 'qa-app-emails.php';
    require_once QA_INCLUDE_DIR . 'qa-db-users.php';
    if (!strlen(trim($emailcode))) {
        $emailcode = qa_db_user_rand_emailcode();
        qa_db_user_set($userid, 'emailcode', $emailcode);
    }
    $unsubscribeurl = qa_path_absolute('unsubscribe', array('c' => $emailcode, 'u' => $handle));
    return qa_send_email(array('fromemail' => qa_opt('mailing_from_email'), 'fromname' => qa_opt('mailing_from_name'), 'toemail' => $email, 'toname' => $handle, 'subject' => qa_opt('mailing_subject'), 'body' => trim(qa_opt('mailing_body')) . "\n\n\n" . qa_lang('users/unsubscribe') . ' ' . $unsubscribeurl, 'html' => false));
}
开发者ID:mostafiz93,项目名称:PrintfScanf,代码行数:11,代码来源:qa-app-mailing.php

示例8: qa_lang

    } else {
        if (empty($inmessage)) {
            $errors['message'] = qa_lang('misc/message_empty');
        }
        if (empty($errors)) {
            require_once QA_INCLUDE_DIR . 'qa-db-messages.php';
            require_once QA_INCLUDE_DIR . 'qa-app-emails.php';
            if (qa_opt('show_message_history')) {
                $messageid = qa_db_message_create($loginuserid, $toaccount['userid'], $inmessage, '', false);
            } else {
                $messageid = null;
            }
            $fromhandle = qa_get_logged_in_handle();
            $canreply = !(qa_get_logged_in_flags() & QA_USER_FLAGS_NO_MESSAGES);
            $more = strtr(qa_lang($canreply ? 'emails/private_message_reply' : 'emails/private_message_info'), array('^f_handle' => $fromhandle, '^url' => qa_path_absolute($canreply ? 'message/' . $fromhandle : 'user/' . $fromhandle)));
            $subs = array('^message' => $inmessage, '^f_handle' => $fromhandle, '^f_url' => qa_path_absolute('user/' . $fromhandle), '^more' => $more, '^a_url' => qa_path_absolute('account'));
            if (qa_send_notification($toaccount['userid'], $toaccount['email'], $toaccount['handle'], qa_lang('emails/private_message_subject'), qa_lang('emails/private_message_body'), $subs)) {
                $messagesent = true;
            } else {
                $pageerror = qa_lang_html('main/general_error');
            }
            qa_report_event('u_message', $loginuserid, qa_get_logged_in_handle(), qa_cookie_get(), array('userid' => $toaccount['userid'], 'handle' => $toaccount['handle'], 'messageid' => $messageid, 'message' => $inmessage));
            if ($messagesent && qa_opt('show_message_history')) {
                // show message as part of general history
                qa_redirect(qa_request(), array('state' => 'message-sent'));
            }
        }
    }
}
//	Prepare content for theme
$qa_content = qa_content_prepare();
开发者ID:gogupe,项目名称:question2answer-releases,代码行数:31,代码来源:qa-page-message.php

示例9: head_metas

 function head_metas()
 {
     qa_html_theme_base::head_metas();
     if (qa_opt('useo_cat_canonical_enable')) {
         $cat_slugs = useo_get_current_category_slug();
         if ($cat_slugs) {
             // it's a category page
             $path = qa_path_absolute(implode('/', $cat_slugs));
             $this->output('<link rel="canonical" href="' . $path . '">');
         }
     }
 }
开发者ID:Kailashaghera,项目名称:Q2A-Ultimate-SEO,代码行数:12,代码来源:layer.php

示例10: ra_get_avatar

function ra_get_avatar($handle, $size = 40, $html = true)
{
    $userid = qa_handle_to_userid($handle);
    if (defined('QA_WORDPRESS_INTEGRATE_PATH')) {
        $img_html = get_avatar(qa_get_user_email($userid), $size);
    } else {
        if (QA_FINAL_EXTERNAL_USERS) {
            $img_html = qa_get_external_avatar_html($userid, $size, false);
        } else {
            if (!isset($handle)) {
                if (qa_opt('avatar_allow_upload') && qa_opt('avatar_default_show') && strlen(qa_opt('avatar_default_blobid'))) {
                    $img = qa_opt('avatar_default_blobid');
                } else {
                    $img = '';
                }
            } else {
                $f = ra_user_data($handle);
                if (empty($f[0]['avatarblobid'])) {
                    if (qa_opt('avatar_allow_upload') && qa_opt('avatar_default_show') && strlen(qa_opt('avatar_default_blobid'))) {
                        $img = qa_opt('avatar_default_blobid');
                    } else {
                        $img = '';
                    }
                } else {
                    $img = $f[0]['avatarblobid'];
                }
            }
        }
    }
    if (empty($img)) {
        return;
    }
    if ($html) {
        return '<a href="' . qa_path_absolute('user/' . $handle) . '"><img src="' . qa_path_absolute('', array('qa' => 'image', 'qa_blobid' => $img, 'qa_size' => $size)) . '" /></a>';
    } elseif (!empty($img)) {
        return qa_path_absolute('', array('qa' => 'image', 'qa_blobid' => $img, 'qa_size' => $size));
    }
}
开发者ID:rahularyan,项目名称:dude-theme,代码行数:38,代码来源:qa-plugin.php

示例11: sc_ra_user_compact

    function sc_ra_user_compact()
    {
        if (qw_hook_exist(__FUNCTION__)) {
            $args = func_get_args();
            array_unshift($args, $this);
            return qw_event_hook(__FUNCTION__, $args, NULL);
        }
        $handle = explode('/', qa_request());
        $handle = $handle[1];
        ob_start();
        ?>
			<div class="user-compact">
			<div class="user-info clearfix">
				<div class="avatar pull-left">
					<?php 
        echo ra_get_avatar($handle, 40);
        ?>
				</div>	
				<div class="name-point">
					<h5><?php 
        echo $handle;
        ?>
</h5>
					<span class="points"><?php 
        echo ra_user_points($handle);
        ?>
</span>
				</div>
			</div>
			<ul class="user-list-menu">
				<?php 
        if (ra_is_admin()) {
            echo '<li class="edit-profile-link"><a id="edit-user" class="btn btn-xs btn-success edit-profile icon-edit" href="' . qa_path_absolute('user/' . $handle, array('state' => 'edit')) . '">Edit User</a></li>';
        }
        foreach ($this->content['navigation']['sub'] as $k => $nav) {
            if ($k != 'wall') {
                echo '<li><a href="' . @$nav['url'] . '">' . @$nav['label'] . '</a></li>';
            }
        }
        ?>
			</ul>
			</div>
			<?php 
        $this->output(ob_get_clean());
    }
开发者ID:rahularyan,项目名称:dude-theme,代码行数:45,代码来源:blocks.php

示例12: qa_post_text

    require_once QA_INCLUDE_DIR . 'util/string.php';
    $inmessage = qa_post_text('message');
    $inname = qa_post_text('name');
    $inemail = qa_post_text('email');
    $inreferer = qa_post_text('referer');
    if (!qa_check_form_security_code('feedback', qa_post_text('code'))) {
        $pageerror = qa_lang_html('misc/form_security_again');
    } else {
        if (empty($inmessage)) {
            $errors['message'] = qa_lang('misc/feedback_empty');
        }
        if ($usecaptcha) {
            qa_captcha_validate_post($errors);
        }
        if (empty($errors)) {
            $subs = array('^message' => $inmessage, '^name' => empty($inname) ? '-' : $inname, '^email' => empty($inemail) ? '-' : $inemail, '^previous' => empty($inreferer) ? '-' : $inreferer, '^url' => isset($userid) ? qa_path_absolute('user/' . qa_get_logged_in_handle()) : '-', '^ip' => qa_remote_ip_address(), '^browser' => @$_SERVER['HTTP_USER_AGENT']);
            if (qa_send_email(array('fromemail' => qa_email_validate(@$inemail) ? $inemail : qa_opt('from_email'), 'fromname' => $inname, 'toemail' => qa_opt('feedback_email'), 'toname' => qa_opt('site_title'), 'subject' => qa_lang_sub('emails/feedback_subject', qa_opt('site_title')), 'body' => strtr(qa_lang('emails/feedback_body'), $subs), 'html' => false))) {
                $feedbacksent = true;
            } else {
                $pageerror = qa_lang_html('main/general_error');
            }
            qa_report_event('feedback', $userid, qa_get_logged_in_handle(), qa_cookie_get(), array('email' => $inemail, 'name' => $inname, 'message' => $inmessage, 'previous' => $inreferer, 'browser' => @$_SERVER['HTTP_USER_AGENT']));
        }
    }
}
//	Prepare content for theme
$qa_content = qa_content_prepare();
$qa_content['title'] = qa_lang_html('misc/feedback_title');
$qa_content['error'] = @$pageerror;
$qa_content['form'] = array('tags' => 'method="post" action="' . qa_self_html() . '"', 'style' => 'tall', 'fields' => array('message' => array('type' => $feedbacksent ? 'static' : '', 'label' => qa_lang_html_sub('misc/feedback_message', qa_opt('site_title')), 'tags' => 'name="message" id="message"', 'value' => qa_html(@$inmessage), 'rows' => 8, 'error' => qa_html(@$errors['message'])), 'name' => array('type' => $feedbacksent ? 'static' : '', 'label' => qa_lang_html('misc/feedback_name'), 'tags' => 'name="name"', 'value' => qa_html(isset($inname) ? $inname : @$userprofile['name'])), 'email' => array('type' => $feedbacksent ? 'static' : '', 'label' => qa_lang_html('misc/feedback_email'), 'tags' => 'name="email"', 'value' => qa_html(isset($inemail) ? $inemail : qa_get_logged_in_email()), 'note' => $feedbacksent ? null : qa_opt('email_privacy'))), 'buttons' => array('send' => array('label' => qa_lang_html('main/send_button'))), 'hidden' => array('dofeedback' => '1', 'code' => qa_get_form_security_code('feedback'), 'referer' => qa_html(isset($inreferer) ? $inreferer : @$_SERVER['HTTP_REFERER'])));
if ($usecaptcha && !$feedbacksent) {
开发者ID:swuit,项目名称:swuit-q2a,代码行数:31,代码来源:feedback.php

示例13: qw_notify_users_by_email

function qw_notify_users_by_email($event, $postid, $userid, $effecteduserid, $params)
{
    if (!!$effecteduserid) {
        //get the working user data
        $logged_in_handle = qa_get_logged_in_handle();
        $logged_in_user_name = qw_get_name_from_userid($userid);
        $logged_in_user_name = !!$logged_in_user_name ? $logged_in_user_name : $logged_in_handle;
        $name = qw_get_name_from_userid($effecteduserid);
        switch ($event) {
            case 'a_post':
            case 'related':
                $parent = isset($params['parent']) ? $params['parent'] : "";
                if (!!$parent) {
                    $name = !!$name ? $name : $parent['handle'];
                    $email = $parent['email'];
                    $handle = $parent['handle'];
                } else {
                    //seems proper values are not available
                    return;
                }
                break;
            case 'c_post':
            case 'q_reshow':
            case 'a_reshow':
            case 'c_reshow':
            case 'a_select':
            case 'q_vote_up':
            case 'q_vote_down':
            case 'a_vote_up':
            case 'a_vote_down':
            case 'q_favorite':
            case 'u_favorite':
            case 'u_message':
            case 'u_wall_post':
            case 'u_level':
            case 'q_post_user_fl':
            case 'q_post_tag_fl':
            case 'q_post_cat_fl':
                //this is because we wont have the $parent['email'] for each effected userids when a these selected events occurs
                $user_details = qw_get_user_details_from_userid($effecteduserid);
                $handle = $user_details['handle'];
                $name = !!$name ? $name : $user_details['handle'];
                $email = $user_details['email'];
                break;
            case 'q_approve':
            case 'q_reject':
                $oldquestion = $params['oldquestion'];
                $handle = $oldquestion['handle'];
                $name = !!$name ? $name : $oldquestion['handle'];
                $email = $oldquestion['email'];
                break;
            case 'a_approve':
            case 'a_reject':
                $oldanswer = $params['oldanswer'];
                $handle = $oldquestion['handle'];
                $name = !!$name ? $name : $oldanswer['handle'];
                $email = $oldanswer['email'];
                break;
            case 'c_approve':
            case 'c_reject':
                $oldcomment = $params['oldcomment'];
                $handle = $oldcomment['handle'];
                $name = !!$name ? $name : $oldcomment['handle'];
                $email = $oldcomment['email'];
                break;
            default:
                break;
        }
        include_once QA_INCLUDE_DIR . 'qa-util-string.php';
        $notifying_user['userid'] = $effecteduserid;
        $notifying_user['name'] = $name;
        $notifying_user['email'] = $email;
        $notifying_user['handle'] = isset($handle) ? $handle : qa_lang('main/anonymous');
        //consider only first 50 characters for saving notification
        if ($event === 'u_message') {
            $content = isset($params['message']) && !empty($params['message']) ? $params['message'] : "";
            $title = "";
            $canreply = !(qa_get_logged_in_flags() & QA_USER_FLAGS_NO_MESSAGES);
            $url = qa_path_absolute($canreply ? 'message/' . $logged_in_handle : 'user/' . $logged_in_handle);
        } else {
            if ($event === 'u_wall_post') {
                $content = isset($params['text']) && !empty($params['text']) ? $params['text'] : "";
                if (!!$content) {
                    $blockwordspreg = qa_get_block_words_preg();
                    $content = qa_block_words_replace($content, $blockwordspreg);
                }
                $title = "";
                $url = qa_path_absolute('user/' . $params['handle'] . '/wall', null, null);
            } else {
                if ($event === 'u_level') {
                    $title = "";
                    $url = qa_path_absolute('user/' . $params['handle']);
                    $old_level = $params['oldlevel'];
                    $new_level = $params['level'];
                    if ($new_level < $old_level) {
                        return;
                    }
                    $approved_only = "";
                    if ($new_level == QA_USER_LEVEL_APPROVED && $old_level < QA_USER_LEVEL_APPROVED) {
                        $approved_only = true;
//.........这里部分代码省略.........
开发者ID:rahularyan,项目名称:dude-theme,代码行数:101,代码来源:email-events.php

示例14: activitylist


//.........这里部分代码省略.........
										<div class="footer">									
											<span class="date">' . qa_lang_sub('dude/x_ago', $event['date']) . '</span>
										</div>
									</a>
								</div>
							</div>';
                        break;
                    case 'q_reject':
                        $url = qa_path_html(qa_q_request($event['params']['qid'], $event['params']['qtitle']), $url_param, QW_BASE_URL, null);
                        echo '<div class="event-content clearfix' . $read . '"' . $id . '>
								<div class="avatar"><a class="icon icon-times" href="' . $url . '"></a></div>
								<div class="event-right">
									<a href="' . $url . '">
										<div class="head">
											<strong class="user">' . $handle . '</strong>
											<span class="what">' . qa_lang_html('dude/your_question_is_rejected') . '</span>
										</div>
										<div class="footer">
											<span class="date">' . qa_lang_sub('dude/x_ago', $event['date']) . '</span>
										</div>
									</a>
								</div>
							</div>';
                        break;
                    case 'a_reject':
                        $anchor = qa_anchor('A', $event['postid']);
                        $url = qa_path_html(qa_q_request($event['params']['qid'], $event['params']['qtitle']), $url_param, QW_BASE_URL, null, $anchor);
                        echo '<div class="event-content clearfix' . $read . '"' . $id . '>
								<div class="avatar"><a class="icon icon-times" href="' . $url . '"></a></div>
								<div class="event-right">
									<a href="' . $url . '">
										<div class="head">
											<strong class="user">' . $handle . '</strong>
											<span class="what">' . qa_lang_html('dude/your_answer_is_rejected') . '</span>
										</div>
										<div class="footer">									
											<span class="date">' . qa_lang_sub('dude/x_ago', $event['date']) . '</span>
										</div>
									</a>
								</div>
							</div>';
                        break;
                    case 'c_reject':
                        $anchor = qa_anchor('C', $event['postid']);
                        $url = qa_path_html(qa_q_request($event['params']['qid'], $event['params']['qtitle']), $url_param, QW_BASE_URL, null, $anchor);
                        echo '<div class="event-content clearfix' . $read . '"' . $id . '>
								<div class="avatar"><a class="icon icon-times" href="' . $url . '"></a></div>
								<div class="event-right">
									<a href="' . $url . '">
										<div class="head">
											<strong class="user">' . $handle . '</strong>
											<span class="what">' . qa_lang_html('dude/your_comment_is_rejected') . '</span>
										</div>
										<div class="footer">									
											<span class="date">' . qa_lang_sub('dude/x_ago', $event['date']) . '</span>
										</div>
									</a>
								</div>
							</div>';
                        break;
                    case 'u_level':
                        $url = qa_path_absolute('user/' . $event['params']['handle']);
                        $old_level = $event['params']['oldlevel'];
                        $new_level = $event['params']['level'];
                        if ($new_level < $old_level) {
                            break;
                        }
                        $approved_only = "";
                        if ($new_level == QA_USER_LEVEL_APPROVED && $old_level < QA_USER_LEVEL_APPROVED) {
                            $approved_only = true;
                        } else {
                            $approved_only = false;
                        }
                        if ($approved_only === false) {
                            $new_designation = qw_get_user_desg($new_level);
                        }
                        $content = strtr(qa_lang($approved_only ? 'notification/u_level_approved_notf' : 'notification/u_level_improved_notf'), array('^new_designation' => @$new_designation));
                        echo '<div class="event-content clearfix' . $read . '"' . $id . '>
								<div class="avatar"><a class="icon icon-user" href="' . $url . '"></a></div>
								<div class="event-right">
									<a href="' . $url . '">
										<div class="head">
											<strong class="user">' . $handle . '</strong>
											<span class="what">' . $content . '</span>
										</div>
										<div class="footer">
											<span class="points">' . qa_lang_sub('dude/you_have_earned_x_points', $event_point['a_vote_up']) . '</span>
											<span class="date">' . qa_lang_sub('dude/x_ago', $event['date']) . '</span>
										</div>
									</a>
								</div>
							</div>';
                        break;
                }
            }
        } else {
            echo '<div class="no-more-activity">' . qa_lang_html('dude/no_more_activity') . '</div>';
        }
        die;
    }
开发者ID:rahularyan,项目名称:dude-theme,代码行数:101,代码来源:addon.php

示例15: qa_start_reset_user

function qa_start_reset_user($userid)
{
    if (qa_to_override(__FUNCTION__)) {
        $args = func_get_args();
        return qa_call_override(__FUNCTION__, $args);
    }
    require_once QA_INCLUDE_DIR . 'db/users.php';
    require_once QA_INCLUDE_DIR . 'app/options.php';
    require_once QA_INCLUDE_DIR . 'app/emails.php';
    require_once QA_INCLUDE_DIR . 'db/selects.php';
    qa_db_user_set($userid, 'emailcode', qa_db_user_rand_emailcode());
    $userinfo = qa_db_select_with_pending(qa_db_user_account_selectspec($userid, true));
    if (!qa_send_notification($userid, $userinfo['email'], $userinfo['handle'], qa_lang('emails/reset_subject'), qa_lang('emails/reset_body'), array('^code' => $userinfo['emailcode'], '^url' => qa_path_absolute('reset', array('c' => $userinfo['emailcode'], 'e' => $userinfo['email']))))) {
        qa_fatal_error('Could not send reset password email');
    }
}
开发者ID:swuit,项目名称:swuit-q2a,代码行数:16,代码来源:users-edit.php


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