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


PHP qa_js函数代码示例

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


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

示例1: form_html

 /**
  * reCAPTCHA HTML - we actually return nothing because the new reCAPTCHA requires 'explicit rendering'
  * via JavaScript when we have multiple Captchas per page. It also auto-detects the user's language.
  */
 public function form_html(&$qa_content, $error)
 {
     $pub = qa_opt('recaptcha_public_key');
     // onload handler
     $qa_content['script_lines'][] = array('function recaptcha_load(elemId) {', '  if (grecaptcha) {', '    grecaptcha.render(elemId, {', '      "sitekey": ' . qa_js($pub), '    });', '  }', '}', 'function recaptcha_onload() {', '  recaptcha_load("qa_captcha_div_1");', '}');
     $qa_content['script_src'][] = 'https://www.google.com/recaptcha/api.js?onload=recaptcha_onload&render=explicit';
     return '';
 }
开发者ID:swuit,项目名称:swuit-q2a,代码行数:12,代码来源:qa-recaptcha-captcha.php

示例2: test__qa_js

 public function test__qa_js()
 {
     $this->assertSame("'test'", qa_js('test'));
     $this->assertSame("'test'", qa_js('test', true));
     $this->assertSame(123, qa_js(123));
     $this->assertSame("'123'", qa_js(123, true));
     $this->assertSame('true', qa_js(true));
     $this->assertSame("'true'", qa_js(true, true));
 }
开发者ID:nikhilkumar80,项目名称:question2answer,代码行数:9,代码来源:BaseTest.php

示例3: form_html

 function form_html(&$qa_content, $error)
 {
     require_once $this->directory . 'recaptchalib.php';
     $language = qa_opt('site_language');
     if (strpos('|en|nl|fr|de|pt|ru|es|tr|', '|' . $language . '|') === false) {
         // supported as of 3/2010
         $language = 'en';
     }
     $qa_content['script_lines'][] = array("var RecaptchaOptions={", "\ttheme:'white',", "\tlang:" . qa_js($language), "};");
     return recaptcha_get_html(qa_opt('recaptcha_public_key'), $error, qa_is_https_probably());
 }
开发者ID:mostafiz93,项目名称:PrintfScanf,代码行数:11,代码来源:qa-recaptcha-captcha.php

示例4: qa_set_up_captcha_field

function qa_set_up_captcha_field(&$qa_content, &$fields, $errors, $note = null)
{
    if (qa_captcha_possible()) {
        $fields['captcha'] = array('type' => 'custom', 'label' => qa_lang_html('misc/captcha_label'), 'html' => qa_captcha_html(@$errors['captcha']), 'error' => isset($errors['captcha']) ? qa_lang_html('misc/captcha_error') : null, 'note' => $note);
        $language = qa_opt('site_language');
        if (strpos('|en|nl|fr|de|pt|ru|es|tr|', '|' . $language . '|') === false) {
            // supported as of 3/2010
            $language = 'en';
        }
        $qa_content['script_lines'][] = array("var RecaptchaOptions = {", "\ttheme:'white',", "\tlang:" . qa_js($language), "}");
    }
}
开发者ID:TheProjecter,项目名称:microprobe,代码行数:12,代码来源:qa-app-captcha.php

示例5: get_field

 function get_field(&$qa_content, $content, $format, $fieldname, $rows, $autofocus)
 {
     $uploadimages = qa_opt('wysiwyg_editor_upload_images');
     $uploadall = $uploadimages && qa_opt('wysiwyg_editor_upload_all');
     $qa_content['script_src'][] = $this->urltoroot . 'ckeditor.js?' . QA_VERSION;
     $qa_content['script_onloads'][] = "CKEDITOR.replace(" . qa_js($fieldname) . ", {toolbar:[" . "['Bold','Italic','Underline','Strike']," . "['Font','FontSize']," . "['TextColor','BGColor']," . "['Link','Unlink']," . "'/'," . "['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock']," . "['NumberedList','BulletedList','-','Outdent','Indent','Blockquote']," . "['Image','Flash','Table','HorizontalRule','Smiley','SpecialChar']," . "['RemoveFormat', 'Maximize']" . "]" . ", defaultLanguage:" . qa_js(qa_opt('site_language')) . ", skin:'v2'" . ", toolbarCanCollapse:false" . ", removePlugins:'elementspath'" . ", resize_enabled:false" . ", autogrow:false" . ", startupFocus:" . ($autofocus ? 'true' : 'false') . ", entities:false" . ($uploadimages ? ", filebrowserImageUploadUrl:" . qa_js(qa_path('wysiwyg-editor-upload', array('qa_only_image' => true))) : "") . ($uploadall ? ", filebrowserUploadUrl:" . qa_js(qa_path('wysiwyg-editor-upload')) : "") . "})";
     if ($format == 'html') {
         $html = $content;
     } else {
         $html = qa_html($content, true);
     }
     return array('tags' => 'NAME="' . $fieldname . '"', 'value' => qa_html($html), 'rows' => $rows);
 }
开发者ID:TheProjecter,项目名称:microprobe,代码行数:13,代码来源:qa-wysiwyg-editor.php

示例6: output_widget

    public function output_widget($region, $place, $themeobject, $template, $request, $qa_content)
    {
        $divstyle = '';
        switch ($region) {
            case 'full':
                // Leaderboard
                $divstyle = 'width:728px; margin:0 auto;';
                // fall-through
            // fall-through
            case 'main':
                // Leaderboard
                $width = 728;
                $height = 90;
                $format = '728x90_as';
                break;
            case 'side':
                // Wide skyscraper
                $width = 160;
                $height = 600;
                $format = '160x600_as';
                break;
        }
        ?>
<div style="<?php 
        echo $divstyle;
        ?>
">
	<script type="text/javascript">
	google_ad_client = <?php 
        echo qa_js(qa_opt('adsense_publisher_id'));
        ?>
;
	google_ad_width = <?php 
        echo qa_js($width);
        ?>
;
	google_ad_height = <?php 
        echo qa_js($height);
        ?>
;
	google_ad_format = <?php 
        echo qa_js($format);
        ?>
;
	google_ad_type = "text_image";
	google_ad_channel = "";
	</script>
	<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
</div>
<?php 
    }
开发者ID:swuit,项目名称:swuit-q2a,代码行数:51,代码来源:qa-basic-adsense.php

示例7: facebook_html

    function facebook_html($tourl, $logout, $context)
    {
        if ($context == 'login' || $context == 'register') {
            $size = 'large';
        } else {
            $size = 'medium';
        }
        ?>
      <div id="fb-root" style="display:inline;"></div>
      <script>
        window.fbAsyncInit = function() {
          FB.init({
            appId      : <?php 
        echo qa_js(qa_opt('facebook_app_id'), true);
        ?>
,
            status     : true, 
            cookie     : true,
            xfbml      : true,
            oauth      : true
          });

         FB.Event.subscribe('<?php 
        echo $logout ? 'auth.logout' : 'auth.login';
        ?>
', function(response) {
           setTimeout("window.location=<?php 
        echo qa_js($tourl);
        ?>
", 100);
         });
        };
        (function(d){
           var js, id = 'facebook-jssdk'; if (d.getElementById(id)) {return;}
           js = d.createElement('script'); js.id = id; js.async = true;
           js.src = "//connect.facebook.net/en_US/all.js";
           d.getElementsByTagName('head')[0].appendChild(js);
         }(document));
      </script>
      <div class="fb-login-button" style="display:inline; vertical-align:middle;" size="<?php 
        echo $size;
        ?>
" <?php 
        echo $logout ? 'autologoutlink="true"' : 'scope="email,user_about_me,user_location,user_website"';
        ?>
>
      </div>

<?php 
    }
开发者ID:justblues,项目名称:LEMP-Q2A,代码行数:50,代码来源:qa-facebook-login.php

示例8: test__qa_js

 public function test__qa_js()
 {
     $test = qa_js('test');
     $this->assertSame("'test'", $test);
     $test = qa_js('test', true);
     $this->assertSame("'test'", $test);
     $test = qa_js(123);
     $this->assertSame(123, $test);
     $test = qa_js(123, true);
     $this->assertSame("'123'", $test);
     $test = qa_js(true);
     $this->assertSame('true', $test);
     $test = qa_js(true, true);
     $this->assertSame("'true'", $test);
 }
开发者ID:swuit,项目名称:swuit-q2a,代码行数:15,代码来源:BaseTest.php

示例9: test__qa_js

 public function test__qa_js()
 {
     $test = qa_js('test');
     $this->assertEquals($test, "'test'");
     $test = qa_js('test', true);
     $this->assertEquals($test, "'test'");
     $test = qa_js(123);
     $this->assertEquals($test, 123);
     $test = qa_js(123, true);
     $this->assertEquals($test, "'123'");
     $test = qa_js(true);
     $this->assertEquals($test, 'true');
     $test = qa_js(true, true);
     $this->assertEquals($test, "'true'");
 }
开发者ID:GitFuture,项目名称:bmf,代码行数:15,代码来源:BaseTest.php

示例10: process_request

 function process_request($request)
 {
     $message = '';
     $url = '';
     if (is_array($_FILES) && count($_FILES)) {
         if (!qa_opt('wysiwyg_editor_upload_images')) {
             $message = qa_lang('users/no_permission');
         }
         require_once QA_INCLUDE_DIR . 'qa-app-upload.php';
         $upload = qa_upload_file_one(qa_opt('wysiwyg_editor_upload_max_size'), qa_get('qa_only_image') || !qa_opt('wysiwyg_editor_upload_all'), qa_get('qa_only_image') ? 600 : null, null);
         $message = @$upload['error'];
         $url = @$upload['bloburl'];
     }
     echo "<script type='text/javascript'>window.parent.CKEDITOR.tools.callFunction(" . qa_js(qa_get('CKEditorFuncNum')) . ", " . qa_js($url) . ", " . qa_js($message) . ");</script>";
     return null;
 }
开发者ID:mostafiz93,项目名称:PrintfScanf,代码行数:16,代码来源:qa-wysiwyg-upload.php

示例11: doctype

 function doctype()
 {
     if ($this->request == 'admin/permissions' && qa_get_logged_in_level() >= QA_USER_LEVEL_ADMIN) {
         $permits[] = 'signature_allow';
         $permits[] = 'signature_edit_allow';
         foreach ($permits as $optionname) {
             $value = qa_opt($optionname);
             $optionfield = array('id' => $optionname, 'label' => qa_lang_html('signature_plugin/' . $optionname) . ':', 'tags' => 'NAME="option_' . $optionname . '" ID="option_' . $optionname . '"', 'value' => $value, 'error' => qa_html(@$errors[$optionname]));
             $widest = QA_PERMIT_USERS;
             $narrowest = QA_PERMIT_ADMINS;
             $permitoptions = qa_admin_permit_options($widest, $narrowest, !QA_FINAL_EXTERNAL_USERS && qa_opt('confirm_user_emails'));
             if (count($permitoptions) > 1) {
                 qa_optionfield_make_select($optionfield, $permitoptions, $value, $value == QA_PERMIT_CONFIRMED ? QA_PERMIT_USERS : min(array_keys($permitoptions)));
             }
             $this->content['form']['fields'][$optionname] = $optionfield;
             $this->content['form']['fields'][$optionname . '_points'] = array('id' => $optionname . '_points', 'tags' => 'NAME="option_' . $optionname . '_points" ID="option_' . $optionname . '_points"', 'type' => 'number', 'value' => qa_opt($optionname . '_points'), 'prefix' => qa_lang_html('admin/users_must_have') . '&nbsp;', 'note' => qa_lang_html('admin/points'));
             $checkboxtodisplay[$optionname . '_points'] = '(option_' . $optionname . '==' . qa_js(QA_PERMIT_POINTS) . ') ||(option_' . $optionname . '==' . qa_js(QA_PERMIT_POINTS_CONFIRMED) . ')';
         }
         qa_set_display_rules($this->content, $checkboxtodisplay);
     }
     if (qa_opt('signatures_enable')) {
         // add user signature
         if ($this->template == 'user' && isset($this->content['form_activity']) && !qa_get('tab')) {
             $sig_form = $this->content['user_signature_form'];
             // from overrides
             // insert our form
             if (isset($this->content['q_list'])) {
                 // array splicing kungfu thanks to Stack Exchange
                 // This adds form-signature before q_list
                 $keys = array_keys($this->content);
                 $vals = array_values($this->content);
                 $insertBefore = array_search('q_list', $keys);
                 $keys2 = array_splice($keys, $insertBefore);
                 $vals2 = array_splice($vals, $insertBefore);
                 $keys[] = 'form-signature';
                 $vals[] = $sig_form;
                 $this->content = array_merge(array_combine($keys, $vals), array_combine($keys2, $vals2));
             } else {
                 $this->content['form-signature'] = $sig_form;
             }
         }
     }
     qa_html_theme_base::doctype();
 }
开发者ID:NoahY,项目名称:q2a-signatures,代码行数:44,代码来源:qa-sig-layer.php

示例12: doctype

 function doctype()
 {
     if ($this->request == 'admin/permissions' && qa_get_logged_in_level() >= QA_USER_LEVEL_ADMIN) {
         $permits[] = 'xmlrpc_access';
         foreach ($permits as $optionname) {
             $value = qa_opt($optionname);
             $optionfield = array('id' => $optionname, 'label' => qa_lang_html('xmlrpc/' . $optionname) . ':', 'tags' => 'NAME="option_' . $optionname . '" ID="option_' . $optionname . '"', 'value' => $value, 'error' => qa_html(@$errors[$optionname]));
             $widest = QA_PERMIT_USERS;
             $narrowest = QA_PERMIT_ADMINS;
             $permitoptions = qa_admin_permit_options($widest, $narrowest, !QA_FINAL_EXTERNAL_USERS && qa_opt('confirm_user_emails'));
             if (count($permitoptions) > 1) {
                 qa_optionfield_make_select($optionfield, $permitoptions, $value, $value == QA_PERMIT_CONFIRMED ? QA_PERMIT_USERS : min(array_keys($permitoptions)));
             }
             $this->content['form']['fields'][$optionname] = $optionfield;
             $this->content['form']['fields'][$optionname . '_points'] = array('id' => $optionname . '_points', 'tags' => 'NAME="option_' . $optionname . '_points" ID="option_' . $optionname . '_points"', 'type' => 'number', 'value' => qa_opt($optionname . '_points'), 'prefix' => qa_lang_html('admin/users_must_have') . '&nbsp;', 'note' => qa_lang_html('admin/points'));
             $checkboxtodisplay[$optionname . '_points'] = '(option_' . $optionname . '==' . qa_js(QA_PERMIT_POINTS) . ') ||(option_' . $optionname . '==' . qa_js(QA_PERMIT_POINTS_CONFIRMED) . ')';
         }
         qa_set_display_rules($this->content, $checkboxtodisplay);
     }
     qa_html_theme_base::doctype();
 }
开发者ID:swuit,项目名称:swuit-q2a,代码行数:21,代码来源:qa-rpc-layer.php

示例13: qa_admin_page_error

$qa_content['error'] = qa_admin_page_error();
$qa_content['form'] = array('style' => 'wide', 'fields' => array('q2a_version' => array('label' => qa_lang_html('admin/q2a_version'), 'value' => qa_html(QA_VERSION)), 'q2a_date' => array('label' => qa_lang_html('admin/q2a_build_date'), 'value' => qa_html(QA_BUILD_DATE)), 'q2a_latest' => array('label' => qa_lang_html('admin/q2a_latest_version'), 'type' => 'custom', 'html' => '<iframe src="http://www.question2answer.org/question2answer-latest.php?version=' . urlencode(QA_VERSION) . '&language=' . urlencode(qa_opt('site_language')) . '" width="100" height="16" style="vertical-align:middle; border:0; background:transparent;" allowTransparency="true" scrolling="no" frameborder="0"></iframe>'), 'break0' => array('type' => 'blank'), 'db_version' => array('label' => qa_lang_html('admin/q2a_db_version'), 'value' => qa_html(qa_opt('db_version'))), 'db_size' => array('label' => qa_lang_html('admin/q2a_db_size'), 'value' => qa_html(number_format(qa_db_table_size() / 1048576, 1) . ' MB')), 'break1' => array('type' => 'blank'), 'php_version' => array('label' => qa_lang_html('admin/php_version'), 'value' => qa_html(phpversion())), 'mysql_version' => array('label' => qa_lang_html('admin/mysql_version'), 'value' => qa_html(qa_db_mysql_version())), 'break2' => array('type' => 'blank'), 'qcount' => array('label' => qa_lang_html('admin/total_qs'), 'value' => qa_html(number_format($qcount))), 'qcount_users' => array('label' => qa_lang_html('admin/from_users'), 'value' => qa_html(number_format($qcount - $qcount_anon))), 'qcount_anon' => array('label' => qa_lang_html('admin/from_anon'), 'value' => qa_html(number_format($qcount_anon))), 'break3' => array('type' => 'blank'), 'acount' => array('label' => qa_lang_html('admin/total_as'), 'value' => qa_html(number_format($acount))), 'acount_users' => array('label' => qa_lang_html('admin/from_users'), 'value' => qa_html(number_format($acount - $acount_anon))), 'acount_anon' => array('label' => qa_lang_html('admin/from_anon'), 'value' => qa_html(number_format($acount_anon))), 'break4' => array('type' => 'blank'), 'ccount' => array('label' => qa_lang_html('admin/total_cs'), 'value' => qa_html(number_format($ccount))), 'ccount_users' => array('label' => qa_lang_html('admin/from_users'), 'value' => qa_html(number_format($ccount - $ccount_anon))), 'ccount_anon' => array('label' => qa_lang_html('admin/from_anon'), 'value' => qa_html(number_format($ccount_anon))), 'break5' => array('type' => 'blank'), 'users' => array('label' => qa_lang_html('admin/users_registered'), 'value' => QA_FINAL_EXTERNAL_USERS ? '' : qa_html(number_format(qa_db_count_users()))), 'users_active' => array('label' => qa_lang_html('admin/users_active'), 'value' => qa_html(number_format((int) qa_opt('cache_userpointscount')))), 'users_posted' => array('label' => qa_lang_html('admin/users_posted'), 'value' => qa_html(number_format(qa_db_count_active_users('posts')))), 'users_voted' => array('label' => qa_lang_html('admin/users_voted'), 'value' => qa_html(number_format(qa_db_count_active_users('uservotes'))))));
if (QA_FINAL_EXTERNAL_USERS) {
    unset($qa_content['form']['fields']['users']);
} else {
    unset($qa_content['form']['fields']['users_active']);
}
foreach ($qa_content['form']['fields'] as $index => $field) {
    if (empty($field['type'])) {
        $qa_content['form']['fields'][$index]['type'] = 'static';
    }
}
$qa_content['form_2'] = array('tags' => 'method="post" action="' . qa_path_html('admin/recalc') . '"', 'title' => qa_lang_html('admin/database_cleanup'), 'style' => 'basic', 'buttons' => array('recount_posts' => array('label' => qa_lang_html('admin/recount_posts'), 'tags' => 'name="dorecountposts" onclick="return qa_recalc_click(this.name, this, ' . qa_js(qa_lang_html('admin/recount_posts_stop')) . ', \'recount_posts_note\');"', 'note' => '<span id="recount_posts_note">' . qa_lang_html('admin/recount_posts_note') . '</span>'), 'reindex_content' => array('label' => qa_lang_html('admin/reindex_content'), 'tags' => 'name="doreindexcontent" onclick="return qa_recalc_click(this.name, this, ' . qa_js(qa_lang_html('admin/reindex_content_stop')) . ', \'reindex_content_note\');"', 'note' => '<span id="reindex_content_note">' . qa_lang_html('admin/reindex_content_note') . '</span>'), 'recalc_points' => array('label' => qa_lang_html('admin/recalc_points'), 'tags' => 'name="dorecalcpoints" onclick="return qa_recalc_click(this.name, this, ' . qa_js(qa_lang_html('admin/recalc_stop')) . ', \'recalc_points_note\');"', 'note' => '<span id="recalc_points_note">' . qa_lang_html('admin/recalc_points_note') . '</span>'), 'refill_events' => array('label' => qa_lang_html('admin/refill_events'), 'tags' => 'name="dorefillevents" onclick="return qa_recalc_click(this.name, this, ' . qa_js(qa_lang_html('admin/recalc_stop')) . ', \'refill_events_note\');"', 'note' => '<span id="refill_events_note">' . qa_lang_html('admin/refill_events_note') . '</span>'), 'recalc_categories' => array('label' => qa_lang_html('admin/recalc_categories'), 'tags' => 'name="dorecalccategories" onclick="return qa_recalc_click(this.name, this, ' . qa_js(qa_lang_html('admin/recalc_stop')) . ', \'recalc_categories_note\');"', 'note' => '<span id="recalc_categories_note">' . qa_lang_html('admin/recalc_categories_note') . '</span>'), 'delete_hidden' => array('label' => qa_lang_html('admin/delete_hidden'), 'tags' => 'name="dodeletehidden" onclick="return qa_recalc_click(this.name, this, ' . qa_js(qa_lang_html('admin/delete_stop')) . ', \'delete_hidden_note\');"', 'note' => '<span id="delete_hidden_note">' . qa_lang_html('admin/delete_hidden_note') . '</span>')), 'hidden' => array('code' => qa_get_form_security_code('admin/recalc')));
if (!qa_using_categories()) {
    unset($qa_content['form_2']['buttons']['recalc_categories']);
}
if (defined('QA_BLOBS_DIRECTORY')) {
    if (qa_db_has_blobs_in_db()) {
        $qa_content['form_2']['buttons']['blobs_to_disk'] = array('label' => qa_lang_html('admin/blobs_to_disk'), 'tags' => 'name="doblobstodisk" onclick="return qa_recalc_click(this.name, this, ' . qa_js(qa_lang_html('admin/blobs_stop')) . ', \'blobs_to_disk_note\');"', 'note' => '<span id="blobs_to_disk_note">' . qa_lang_html('admin/blobs_to_disk_note') . '</span>');
    }
    if (qa_db_has_blobs_on_disk()) {
        $qa_content['form_2']['buttons']['blobs_to_db'] = array('label' => qa_lang_html('admin/blobs_to_db'), 'tags' => 'name="doblobstodb" onclick="return qa_recalc_click(this.name, this, ' . qa_js(qa_lang_html('admin/blobs_stop')) . ', \'blobs_to_db_note\');"', 'note' => '<span id="blobs_to_db_note">' . qa_lang_html('admin/blobs_to_db_note') . '</span>');
    }
}
$qa_content['script_rel'][] = 'qa-content/qa-admin.js?' . QA_VERSION;
$qa_content['script_var']['qa_warning_recalc'] = qa_lang('admin/stop_recalc_warning');
$qa_content['navigation']['sub'] = qa_admin_sub_navigation();
return $qa_content;
/*
	Omit PHP closing tag to help avoid accidental output
*/
开发者ID:kosmoluna,项目名称:question2answer,代码行数:31,代码来源:admin-stats.php

示例14: qa_get_start

}
if (!qa_opt('allow_private_messages') || !qa_opt('show_message_history')) {
    return include QA_INCLUDE_DIR . 'qa-page-not-found.php';
}
//	Find the messages for this user
$start = qa_get_start();
$pagesize = qa_opt('page_size_pms');
// get number of messages then actual messages for this page
$func = $showOutbox ? 'qa_db_messages_outbox_selectspec' : 'qa_db_messages_inbox_selectspec';
$pmSpecCount = qa_db_selectspec_count($func('private', $loginUserId, true));
$pmSpec = $func('private', $loginUserId, true, $start, $pagesize);
list($numMessages, $userMessages) = qa_db_select_with_pending($pmSpecCount, $pmSpec);
$count = $numMessages['count'];
//	Prepare content for theme
$qa_content = qa_content_prepare();
$qa_content['title'] = qa_lang_html($showOutbox ? 'misc/pm_outbox_title' : 'misc/pm_inbox_title');
$qa_content['script_rel'][] = 'qa-content/qa-user.js?' . QA_VERSION;
$qa_content['message_list'] = array('tags' => 'id="privatemessages"', 'messages' => array(), 'form' => array('tags' => 'name="pmessage" method="post" action="' . qa_self_html() . '"', 'style' => 'tall', 'hidden' => array('qa_click' => '', 'handle' => qa_html($loginUserHandle), 'start' => qa_html($start), 'code' => qa_get_form_security_code('pm-' . $loginUserHandle))));
$htmlDefaults = qa_message_html_defaults();
if ($showOutbox) {
    $htmlDefaults['towhomview'] = true;
}
foreach ($userMessages as $message) {
    $msgFormat = qa_message_html_fields($message, $htmlDefaults);
    $replyHandle = $showOutbox ? $message['tohandle'] : $message['fromhandle'];
    $msgFormat['form'] = array('style' => 'light', 'buttons' => array('reply' => array('tags' => 'onclick="window.location.href=\'' . qa_path_html('message/' . $replyHandle) . '\';return false"', 'label' => qa_lang_html('question/reply_button')), 'delete' => array('tags' => 'name="m' . qa_html($message['messageid']) . '_dodelete" onclick="return qa_pm_click(' . qa_js($message['messageid']) . ', this, ' . qa_js($showOutbox ? 'outbox' : 'inbox') . ');"', 'label' => qa_lang_html('question/delete_button'), 'popup' => qa_lang_html('profile/delete_pm_popup'))));
    $qa_content['message_list']['messages'][] = $msgFormat;
}
$qa_content['page_links'] = qa_html_page_links(qa_request(), $start, $pagesize, $count, qa_opt('pages_prev_next'));
$qa_content['navigation']['sub'] = qa_messages_sub_navigation($showOutbox ? 'outbox' : 'inbox');
return $qa_content;
开发者ID:swuit,项目名称:swuit-q2a,代码行数:31,代码来源:messages.php

示例15: array

 }
 //	Combine various Javascript elements in $qa_content into single array for theme layer
 $script = array('<SCRIPT TYPE="text/javascript"><!--');
 if (isset($qa_content['script_var'])) {
     foreach ($qa_content['script_var'] as $var => $value) {
         $script[] = 'var ' . $var . '=' . qa_js($value) . ';';
     }
 }
 if (isset($qa_content['script_lines'])) {
     foreach ($qa_content['script_lines'] as $scriptlines) {
         $script[] = '';
         $script = array_merge($script, $scriptlines);
     }
 }
 if (isset($qa_content['focusid'])) {
     $qa_content['script_onloads'][] = array("var elem=document.getElementById(" . qa_js($qa_content['focusid']) . ");", "if (elem) {", "\telem.select();", "\telem.focus();", "}");
 }
 if (isset($qa_content['script_onloads'])) {
     array_push($script, '', 'var qa_oldonload=window.onload;', 'window.onload=function() {', "\tif (typeof qa_oldonload=='function')", "\t\tqa_oldonload();");
     foreach ($qa_content['script_onloads'] as $scriptonload) {
         $script[] = "\t";
         foreach ((array) $scriptonload as $scriptline) {
             $script[] = "\t" . $scriptline;
         }
     }
     $script[] = '}';
 }
 $script[] = '//--></SCRIPT>';
 if (isset($qa_content['script_rel'])) {
     $uniquerel = array_unique($qa_content['script_rel']);
     // remove any duplicates
开发者ID:TheProjecter,项目名称:microprobe,代码行数:31,代码来源:qa-page.php


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