• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP qa_content_prepare函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: process_request

 function process_request($request)
 {
     $userid = qa_get_logged_in_userid();
     $categoryoptions = array();
     $qa_content = qa_content_prepare();
     // check if we have done a post of the page
     if (qa_post_text('okthen')) {
         // update the current category
         $newcategory = qa_post_text('category');
         if (isset($newcategory)) {
             mp_set_categoryid($newcategory);
             // redirect to main page
             qa_redirect('');
         } else {
             $qa_content['error'] = 'You must select a course to continue.';
         }
     }
     // retrieve list of categories user is associated with
     // populate category options
     $results = mp_get_categories_for_user($userid);
     foreach ($results as $row) {
         $categoryoptions[$row['categoryid']] = $row['title'];
     }
     $qa_content['title'] = 'Registered courses';
     $qa_content['custom'] = 'The following list displays all courses your account is associated with.  Select a course from the list below and click <B>Select</B> to change to the new course<br /><br />';
     $qa_content['form'] = array('tags' => 'METHOD="POST" ACTION="' . qa_self_html() . '"', 'style' => 'wide', 'fields' => array('courses' => array('type' => 'select-radio', 'label' => 'Courses', 'tags' => 'NAME="category"', 'options' => $categoryoptions, 'value' => mp_get_categoryid(), 'error' => qa_html(@$errors['course']))), 'buttons' => array('ok' => array('tags' => 'NAME="okthen"', 'label' => 'Select', 'value' => '1')));
     return $qa_content;
 }
开发者ID:TheProjecter,项目名称:microprobe,代码行数:28,代码来源:mp-change-course-page.php


示例2: process_request

 function process_request($request)
 {
     require_once QA_INCLUDE_DIR . 'mp-app-posts.php';
     require_once QA_INCLUDE_DIR . 'mp-db-users.php';
     $qa_content = qa_content_prepare();
     // if the user is not logged in, request user to login
     if (!qa_get_logged_in_userid()) {
         $qa_content['error'] = qa_insert_login_links('Please ^1log in^2 or ^3register^4 first.', $request);
         return $qa_content;
     }
     $qa_content['title'] = 'Course Announcements';
     // DISPLAY ANNOUCEMENTS
     $data = '<div class="qa-q-list">';
     // retrieve annoucements
     $announcements = mp_announcements_get_all(mp_get_categoryid());
     if (count($announcements) == 0) {
         $data .= "No announcements";
     } else {
         foreach ($announcements as $announcement) {
             $data .= '<div class="qa-q-list-item">';
             $data .= '<div class="qa-q-item-title">' . $announcement['title'] . '</div>';
             $data .= '<div class="qa-q-view-content">' . $announcement['content'] . '</div>';
             $data .= '<div class="qa-q-item-meta">Posted by <A HREF="' . qa_path_html('user/' . $announcement['handle']) . '">' . $announcement['handle'] . '</A> on ' . $announcement['created'] . '</div>';
             $data .= '</div>';
             $data .= '<div class="qa-q-list-item-clear" ></div>';
         }
     }
     $data .= '</div>';
     $qa_content['custom_2'] = $data;
     // create the sub menu for navigation
     $qa_content['navigation']['sub'] = mp_announcements_sub_navigation();
     $qa_content['navigation']['sub']['default']['selected'] = true;
     return $qa_content;
 }
开发者ID:TheProjecter,项目名称:microprobe,代码行数:34,代码来源:mp-announcements-page.php


示例3: process_request

 function process_request($request)
 {
     // double check we are admin
     if (qa_get_logged_in_level() < QA_USER_LEVEL_ADMIN) {
         return;
     }
     if (qa_clicked('docancel')) {
         qa_redirect('admin/plugins');
     }
     $qa_content = qa_content_prepare();
     $qa_content['title'] = 'Widget Anywhere';
     $qa_content['custom'] = '<p><a href="' . qa_path('admin/plugins') . '#' . qa_html($this->anchor) . '">&laquo; back to plugin options</a></p>';
     $saved_msg = null;
     $editid = qa_get('editid');
     if (qa_post_text('dodelete')) {
         $this->delete_widget();
         qa_redirect('admin/plugins');
     } else {
         if (qa_clicked('save_button')) {
             // save widget
             $widget = $this->save_widget();
             $saved_msg = 'Widget saved.';
         } else {
             if (empty($editid)) {
                 // display blank form
                 $widget = array('id' => 0, 'title' => '', 'pages' => '', 'position' => '', 'ordering' => 1, 'content' => '');
             } else {
                 // load specified widget
                 $sql = 'SELECT * FROM ^' . $this->pluginkey . ' WHERE id=#';
                 $result = qa_db_query_sub($sql, $editid);
                 $widget = qa_db_read_one_assoc($result);
             }
         }
     }
     $sel_position = empty($widget['position']) ? null : @$this->positionlangs[$widget['position']];
     // set up page (template) list
     $widget_pages = explode(',', $widget['pages']);
     $sel_pages = array();
     $custom_pages = array();
     foreach ($widget_pages as $page) {
         if (strpos($page, 'custom:') === 0) {
             $custom_pages[] = substr($page, 7);
         } else {
             $sel_pages[] = $page;
         }
     }
     // $chkd = in_array('all', $sel_pages) ? 'checked' : '';
     // $pages_html = '<label><input type="checkbox" name="wpages_all" ' . $chkd . '> ' . qa_lang_html('admin/widget_all_pages') . '</label><br><br>';
     $pages_html = '';
     foreach ($this->templatelangkeys as $tmpl => $langkey) {
         $chkd = in_array($tmpl, $sel_pages) ? 'checked' : '';
         $pages_html .= '<label><input type="checkbox" name="wpages_' . $tmpl . '" ' . $chkd . '> ' . qa_lang_html($langkey) . '</label><br>';
     }
     $qa_content['form'] = array('tags' => 'METHOD="POST" ACTION="' . qa_self_html() . '"', 'style' => 'tall', 'ok' => $saved_msg, 'fields' => array('title' => array('label' => 'Title', 'tags' => 'NAME="wtitle"', 'value' => qa_html($widget['title'])), 'position' => array('type' => 'select', 'label' => 'Position', 'tags' => 'NAME="wposition"', 'options' => $this->positionlangs, 'value' => $sel_position), 'all_pages' => array('type' => 'checkbox', 'id' => 'tb_pages_all', 'label' => qa_lang_html('admin/widget_all_pages'), 'tags' => 'NAME="wpages_all" ID="wpages_all"', 'value' => in_array('all', $sel_pages)), 'pages' => array('type' => 'custom', 'id' => 'tb_pages_list', 'label' => qa_lang_html('admin/widget_pages_explanation'), 'html' => $pages_html), 'show_custom_pages' => array('type' => 'checkbox', 'id' => 'tb_show_custom_pages', 'label' => 'Show on custom page(s)', 'tags' => 'NAME="cb_custom_pages" ID="cb_custom_pages"', 'value' => count($custom_pages) > 0), 'custom_pages' => array('id' => 'tb_custom_pages', 'label' => 'Page slugs', 'tags' => 'NAME="wpages_custom"', 'value' => qa_html(implode(',', $custom_pages)), 'note' => 'Separate multiple page slugs (URL fragments) with commas, e.g. <code>custom-page,other-page</code>'), 'ordering' => array('type' => 'number', 'label' => 'Order', 'tags' => 'NAME="wordering"', 'value' => qa_html($widget['ordering'])), 'content' => array('type' => 'textarea', 'label' => 'Content (HTML)', 'tags' => 'NAME="wcontent"', 'value' => qa_html($widget['content']), 'rows' => 12)), 'hidden' => array('wid' => $widget['id']), 'buttons' => array('save' => array('tags' => 'NAME="save_button"', 'label' => 'Save widget', 'value' => '1'), 'cancel' => array('tags' => 'NAME="docancel"', 'label' => qa_lang_html('main/cancel_button'))));
     if ($widget['id'] > 0) {
         $qa_content['form']['fields']['delete'] = array('tags' => 'NAME="dodelete"', 'label' => 'Delete widget', 'value' => 0, 'type' => 'checkbox');
     }
     qa_set_display_rules($qa_content, array('tb_pages_list' => '!wpages_all', 'tb_show_custom_pages' => '!wpages_all', 'tb_custom_pages' => 'cb_custom_pages && !wpages_all'));
     return $qa_content;
 }
开发者ID:siddiquinoor,项目名称:q2a-widget-anywhere,代码行数:60,代码来源:qa-widget-anywhere.php


示例4: process_request

 public function process_request($request)
 {
     $qa_content = qa_content_prepare(true);
     $qa_content['title'] = qa_opt('site_title') . ' Chat Logs';
     $qa_content['custom'] = '<iframe src="' . $this->urltoroot . 'chat/?view=logs"  width="100%" height="600"></iframe>';
     $qa_content['custom_2'] = '<script type="text/javascript"> $( document ).ready(function() {  $("#settingsContainer").hide(); }); </script>';
     return $qa_content;
 }
开发者ID:arjunsuresh,项目名称:chat,代码行数:8,代码来源:qa-adchat-log-page.php


示例5: process_request

 public function process_request($request)
 {
     $qa_content = qa_content_prepare(true);
     $qa_content['title'] = qa_opt('site_title') . ' Chat';
     $qa_content['custom'] = '<iframe src="' . $this->urltoroot . 'chat"  width="100%" height="800"></iframe>';
     $qa_content['custom_2'] = '<script type="text/javascript"> $( document ).ready(function() {  $("#adchat").hide();   createCookieAdChat("none");}); </script>';
     return $qa_content;
 }
开发者ID:arjunsuresh,项目名称:chat,代码行数:8,代码来源:qa-adchat-page.php


示例6: process_request

 function process_request($request)
 {
     $qa_content = qa_content_prepare();
     $qa_content['site_title'] = "Email Notifications";
     $qa_content['error'] = "";
     $qa_content['suggest_next'] = "";
     $qa_content['custom'] = $this->opt_form();
     return $qa_content;
 }
开发者ID:rahularyan,项目名称:dude-theme,代码行数:9,代码来源:email-page.php


示例7: process_request

 function process_request($request)
 {
     $qa_content = qa_content_prepare();
     $qa_content['title'] = qa_lang_html('example_page/page_title');
     $qa_content['error'] = 'An example error';
     $qa_content['custom'] = 'Some <b>custom html</b>';
     $qa_content['form'] = array('tags' => 'method="post" action="' . qa_self_html() . '"', 'style' => 'wide', 'ok' => qa_post_text('okthen') ? 'You clicked OK then!' : null, 'title' => 'Form title', 'fields' => array('request' => array('label' => 'The request', 'tags' => 'name="request"', 'value' => qa_html($request), 'error' => qa_html('Another error'))), 'buttons' => array('ok' => array('tags' => 'name="okthen"', 'label' => 'OK then', 'value' => '1')), 'hidden' => array('hiddenfield' => '1'));
     $qa_content['custom_2'] = '<p><br>More <i>custom html</i></p>';
     return $qa_content;
 }
开发者ID:netham91,项目名称:question2answer,代码行数:10,代码来源:qa-example-page.php


示例8: process_request

 function process_request($request)
 {
     $qa_content = qa_content_prepare();
     $qa_content['title'] = qa_lang_html('example_page/page_title');
     $qa_content['error'] = 'An example error';
     $qa_content['custom'] = 'Some <B>custom html</B>';
     $qa_content['form'] = array('tags' => 'METHOD="POST" ACTION="' . qa_self_html() . '"', 'style' => 'wide', 'ok' => qa_post_text('okthen') ? 'You clicked OK then!' : null, 'title' => 'Form title', 'fields' => array('request' => array('label' => 'The request', 'tags' => 'NAME="request"', 'value' => qa_html($request), 'error' => qa_html('Another error'))), 'buttons' => array('ok' => array('tags' => 'NAME="okthen"', 'label' => 'OK then', 'value' => '1')), 'hidden' => array('hiddenfield' => '1'));
     $qa_content['custom_2'] = '<P><BR>More <I>custom html</I></P>';
     return $qa_content;
 }
开发者ID:ramo01,项目名称:1kapp,代码行数:10,代码来源:qa-example-page.php


示例9: qa_q_list_page_content

function qa_q_list_page_content($questions, $pagesize, $start, $count, $sometitle, $nonetitle, $navcategories, $categoryid, $categoryqcount, $categorypathprefix, $feedpathprefix, $suggest, $pagelinkparams = null, $categoryparams = null, $dummy = null)
{
    if (qa_to_override(__FUNCTION__)) {
        $args = func_get_args();
        return qa_call_override(__FUNCTION__, $args);
    }
    require_once QA_INCLUDE_DIR . 'app/format.php';
    require_once QA_INCLUDE_DIR . 'app/updates.php';
    $userid = qa_get_logged_in_userid();
    //	Chop down to size, get user information for display
    if (isset($pagesize)) {
        $questions = array_slice($questions, 0, $pagesize);
    }
    $usershtml = qa_userids_handles_html(qa_any_get_userids_handles($questions));
    //	Prepare content for theme
    $qa_content = qa_content_prepare(true, array_keys(qa_category_path($navcategories, $categoryid)));
    $qa_content['q_list']['form'] = array('tags' => 'method="post" action="' . qa_self_html() . '"', 'hidden' => array('code' => qa_get_form_security_code('vote')));
    $qa_content['q_list']['qs'] = array();
    if (count($questions)) {
        $qa_content['title'] = $sometitle;
        $defaults = qa_post_html_defaults('Q');
        if (isset($categorypathprefix)) {
            $defaults['categorypathprefix'] = $categorypathprefix;
        }
        foreach ($questions as $question) {
            $fields = qa_any_to_q_html_fields($question, $userid, qa_cookie_get(), $usershtml, null, qa_post_html_options($question, $defaults));
            if (!empty($fields['raw']['closedbyid'])) {
                $fields['closed'] = array('state' => qa_lang_html('main/closed'));
            }
            $qa_content['q_list']['qs'][] = $fields;
        }
    } else {
        $qa_content['title'] = $nonetitle;
    }
    if (isset($userid) && isset($categoryid)) {
        $favoritemap = qa_get_favorite_non_qs_map();
        $categoryisfavorite = @$favoritemap['category'][$navcategories[$categoryid]['backpath']];
        $qa_content['favorite'] = qa_favorite_form(QA_ENTITY_CATEGORY, $categoryid, $categoryisfavorite, qa_lang_sub($categoryisfavorite ? 'main/remove_x_favorites' : 'main/add_category_x_favorites', $navcategories[$categoryid]['title']));
    }
    if (isset($count) && isset($pagesize)) {
        $qa_content['page_links'] = qa_html_page_links(qa_request(), $start, $pagesize, $count, qa_opt('pages_prev_next'), $pagelinkparams);
    }
    if (empty($qa_content['page_links'])) {
        $qa_content['suggest_next'] = $suggest;
    }
    if (qa_using_categories() && count($navcategories) && isset($categorypathprefix)) {
        $qa_content['navigation']['cat'] = qa_category_navigation($navcategories, $categoryid, $categorypathprefix, $categoryqcount, $categoryparams);
    }
    if (isset($feedpathprefix) && (qa_opt('feed_per_category') || !isset($categoryid))) {
        $qa_content['feed'] = array('url' => qa_path_html(qa_feed_request($feedpathprefix . (isset($categoryid) ? '/' . qa_category_path_request($navcategories, $categoryid) : ''))), 'label' => strip_tags($sometitle));
    }
    return $qa_content;
}
开发者ID:kosmoluna,项目名称:question2answer,代码行数:53,代码来源:q-list.php


示例10: process_request

 function process_request($request)
 {
     $rqsts = explode('_', strtolower($request));
     $qa_content = qa_content_prepare();
     //$qa_content['title']=qa_lang_html('example_page/page_title');
     //$qa_content['error']='An example error'."\n";
     $qa_content['title'] = ' 资料下载';
     $qa_content['custom'] = '<link href="' . $this->urltoroot . 'downpage.css" rel="stylesheet" type="text/css" />' . "\n";
     //$qa_content['custom'].='Some <B>custom html</B>'."\n";
     //
     /*
     			$qa_content['form']=array(
     				'tags' => 'METHOD="POST" ACTION="'.qa_self_html().'"',
     				
     				'style' => 'wide',
     				
     				'ok' => qa_post_text('okthen') ? 'You clicked OK then!' : null,
     				
     				'title' => 'Form title',
     				
     				'fields' => array(
     					'request' => array(
     						'label' => 'The request',
     						'tags' => 'NAME="request"',
     						'value' => qa_html($request),
     						'error' => qa_html('Another error'),
     					),
     					
     				),
     				
     				'buttons' => array(
     					'ok' => array(
     						'tags' => 'NAME="okthen"',
     						'label' => 'OK then',
     						'value' => '1',
     					),
     				),
     				
     				'hidden' => array(
     					'hiddenfield' => '1',
     				),
     			);
     */
     //$qa_content['custom_2']='<P><BR>More <I>custom html</I></P>';
     require_once $this->urltoroot . 'downloadhtml.php';
     $qa_content['custom_2'] = setDownloadHtml($rqsts, $this->urltoroot);
     //$qa_content['custom_2']=$this->urltoroot;
     return $qa_content;
 }
开发者ID:mathjoy,项目名称:math-duodaa,代码行数:49,代码来源:download_pages.php


示例11: process_request

 function process_request($request)
 {
     if (qa_get_logged_in_level() < QA_USER_LEVEL_ADMIN) {
         $qa_content = qa_content_prepare();
         $qa_content['error'] = "You don't have permission to access this page.";
         return $qa_content;
     }
     $qa_content = qa_content_prepare();
     $qa_content['site_title'] = "Infinity Theme";
     $qa_content['title'] = "Theme Option";
     $qa_content['error'] = "";
     $qa_content['suggest_next'] = "";
     $qa_content['custom'] = $this->page_form();
     $qa_content['sidepanel'] = '';
     return $qa_content;
 }
开发者ID:swuit,项目名称:swuit-q2a,代码行数:16,代码来源:options.php


示例12: qa_admin_check_privileges

function qa_admin_check_privileges(&$qa_content)
{
    if (!qa_is_logged_in()) {
        require_once QA_INCLUDE_DIR . 'qa-app-format.php';
        $qa_content = qa_content_prepare();
        $qa_content['title'] = qa_lang_html('admin/admin_title');
        $qa_content['error'] = qa_insert_login_links(qa_lang_html('admin/not_logged_in'), qa_request());
        return false;
    } elseif (qa_get_logged_in_level() < QA_USER_LEVEL_ADMIN) {
        $qa_content = qa_content_prepare();
        $qa_content['title'] = qa_lang_html('admin/admin_title');
        $qa_content['error'] = qa_lang_html('admin/no_privileges');
        return false;
    }
    return true;
}
开发者ID:mathjoy,项目名称:math-duodaa,代码行数:16,代码来源:qa-app-admin.php


示例13: process_request

 function process_request($request)
 {
     $parts = explode('/', $request);
     $tag = $parts[1];
     $qa_content = qa_content_prepare();
     $qa_content['title'] = 'Edit the description for Fture test ' . qa_html($tag);
     require_once QA_INCLUDE_DIR . 'qa-db-metas.php';
     $qa_content['form'] = array('tags' => 'METHOD="POST" ACTION="' . qa_self_html() . '"', 'style' => 'tall', 'fields' => array(array('type' => 'text', 'rows' => 4, 'tags' => 'NAME="tagdesc" ID="tagdesc"', 'value' => qa_html(qa_db_tagmeta_get($tag, 'description')))), 'buttons' => array(array('tags' => 'NAME="dosave"', 'label' => 'Save Description')));
     if (qa_clicked('dosave')) {
         require_once QA_INCLUDE_DIR . 'qa-util-string.php';
         $taglc = qa_strtolower($tag);
         qa_db_tagmeta_set($taglc, 'description', qa_post_text('tagdesc'));
         qa_redirect('tag/' . $tag);
     }
     $qa_content['focusid'] = 'tagdesc';
     return $qa_content;
 }
开发者ID:GitFuture,项目名称:bmf,代码行数:17,代码来源:qa-tag-desc-edit.php


示例14: process_request

 function process_request($request)
 {
     // perform userinfuser registration
     $ui = new UserInfuser("[email protected]", "0658a511-d890-4e51-ba9e-126d6c0a12f2");
     $ui->update_user(qa_get_logged_in_email(), qa_get_logged_in_userid(), "", "");
     $ui->award_points(qa_get_logged_in_email(), 1000);
     $pw = $ui->get_widget(qa_get_logged_in_email(), "points", 100, 100);
     $lw = $ui->get_widget(qa_get_logged_in_email(), "leaderboard", 600, 300);
     $qa_content = qa_content_prepare();
     $qa_content['title'] = 'Example plugin page';
     $qa_content['error'] = 'An example error';
     $qa_content['custom'] = 'Some <B>custom html</B>';
     $qa_content['form'] = array('tags' => 'METHOD="POST" ACTION="' . qa_self_html() . '"', 'style' => 'wide', 'ok' => qa_post_text('okthen') ? 'You clicked OK then!' : null, 'title' => 'Form title', 'fields' => array('request' => array('label' => 'The request' . qa_get_logged_in_userid(), 'tags' => 'NAME="request"', 'value' => qa_html($request), 'error' => qa_html('Another error'))), 'buttons' => array('ok' => array('tags' => 'NAME="okthen"', 'label' => 'OK then', 'value' => '1')), 'hidden' => array('hiddenfield' => '1'));
     $qa_content['custom_2'] = '<P><BR>More <I>custom html</I></P>';
     $qa_content['custom_3'] = $pw . $lw;
     return $qa_content;
 }
开发者ID:TheProjecter,项目名称:microprobe,代码行数:17,代码来源:qa-microprobe-page.php


示例15: process_request

 function process_request($request)
 {
     $qa_content = qa_content_prepare();
     $qa_content['head_lines'][] = '<style>' . qa_opt('faq_css') . '</style>';
     $qa_content['title'] = qa_opt('faq_page_title');
     $qa_content['custom_0'] = $this->filter_subs(qa_opt('faq_pre_html')) . '<' . (qa_opt('faq_list_type') ? 'o' : 'u') . 'l class="qa-faq-list">';
     $idx = 0;
     while (qa_opt('faq_section_' . $idx)) {
         $title = $this->filter_subs(qa_opt('faq_section_' . $idx . '_title'));
         $text = $this->filter_subs(qa_opt('faq_section_' . $idx));
         $qa_content['custom_' . ($idx + 1) . '_title'] = '<li class="qa-faq-list-item"><div id="custom_' . $idx . '_title" onclick="jQuery(\'#custom_' . $idx . '_text\').toggle(\'fast\')" class="qa-faq-section-title">' . $title . '</div>';
         $qa_content['custom_' . ($idx + 1) . '_text'] = '<div id="custom_' . $idx . '_text" class="qa-faq-section-text">' . $text . '</div></li>';
         $idx++;
     }
     $qa_content['custom_' . ++$idx] = '</' . (qa_opt('faq_list_type') ? 'o' : 'u') . 'l>';
     $qa_content['custom_' . ++$idx] = $this->filter_subs(qa_opt('faq_post_html'));
     return $qa_content;
 }
开发者ID:ruuttt,项目名称:question2answer_sandbox,代码行数:18,代码来源:qa-faq-page.php


示例16: process_request

 function process_request($request)
 {
     $qa_content = qa_content_prepare();
     $qa_content['title'] = '联系我们';
     //$qa_content['error']='An example error';
     //$qa_content['custom']='Some <B>custom html</B>';
     /*
     			$qa_content['form']=array(
     				'tags' => 'METHOD="POST" ACTION="'.qa_self_html().'"',
     				
     				'style' => 'wide',
     				
     				'ok' => qa_post_text('okthen') ? 'You clicked OK then!' : null,
     				
     				'title' => 'Form title',
     				
     				'fields' => array(
     					'request' => array(
     						'label' => 'The request',
     						'tags' => 'NAME="request"',
     						'value' => qa_html($request),
     						'error' => qa_html('Another error'),
     					),
     					
     				),
     				
     				'buttons' => array(
     					'ok' => array(
     						'tags' => 'NAME="okthen"',
     						'label' => 'OK then',
     						'value' => '1',
     					),
     				),
     				
     				'hidden' => array(
     					'hiddenfield' => '1',
     				),
     			);
     */
     $qa_content['custom_2'] = file_get_contents($this->directory . 'contacthtml.ini');
     $qa_content['custom_2'] = str_replace('[-contact-img-path-]', $this->urltoroot, $qa_content['custom_2']);
     return $qa_content;
 }
开发者ID:mathjoy,项目名称:math-duodaa,代码行数:43,代码来源:duodaa-contact.php


示例17: process_request

 function process_request($request)
 {
     require_once QA_INCLUDE_DIR . 'qa-app-format.php';
     require_once QA_INCLUDE_DIR . 'qa-app-posts.php';
     require_once QA_INCLUDE_DIR . 'qa-db-post-create.php';
     require_once QA_INCLUDE_DIR . 'mp-db-users.php';
     // report that we entered this page
     qa_report_event('page_enter', qa_get_logged_in_userid(), qa_get_logged_in_handle(), qa_cookie_get(), array('params' => $_SERVER['QUERY_STRING']));
     // create the editor and update its content
     qa_get_post_content('editor', 'content', $ineditor, $incontent, $informat, $intext);
     $editorname = isset($ineditor) ? $ineditor : qa_opt('editor_for_qs');
     $editor = qa_load_editor(@$incontent, @$informat, $editorname);
     // retrieve variable data
     $innotify = qa_post_text('notify') ? true : false;
     // handle creation of annoucement
     if (qa_post_text('docreate')) {
         //retrieve data
         $title = qa_post_text('title');
         $content = $incontent;
         $format = $informat;
         // validate data
         // handle create work
         // actual create process is in file mp-app-posts.php
         $postid = qa_post_create('AN', null, $title, $content, $format, mp_get_categoryid(), null, qa_get_logged_in_userid(), $innotify);
         // redirect page
         qa_redirect('mp-announcements-page');
         // our work is done here
     }
     $qa_content = qa_content_prepare();
     // if the user is not logged in, request user to login
     if (!qa_get_logged_in_userid()) {
         $qa_content['error'] = qa_insert_login_links('Please ^1log in^2 or ^3register^4 first.', $request);
         return $qa_content;
     }
     $qa_content['title'] = 'Create Announcement';
     $qa_content['form_newannouncement'] = array('tags' => 'METHOD="POST" ACTION="' . qa_self_html() . '"', 'style' => 'tall', 'fields' => array('title' => array('label' => qa_lang_html('announcements/a_title_label'), 'tags' => 'NAME="title"', 'value' => qa_html(qa_post_text('title')), 'error' => qa_html(@$errors['title'])), 'content' => array_merge($editor->get_field($qa_content, @$incontent, @$informat, 'content', 12, false), array('label' => qa_lang_html('announcements/a_content_label'), 'error' => qa_html(@$errors['content']))), 'notify' => array('label' => 'Send email notification to all registered students', 'tags' => 'NAME="notify"', 'type' => 'checkbox', 'value' => qa_html($innotify))), 'buttons' => array('ok' => array('tags' => 'NAME="docreate"', 'label' => 'Create Announcement', 'value' => '1')), 'hidden' => array('hiddenfield' => '1', 'editor' => qa_html($editorname)));
     // create the sub menu for navigation
     $qa_content['navigation']['sub'] = mp_announcements_sub_navigation();
     $qa_content['navigation']['sub']['create']['selected'] = true;
     return $qa_content;
 }
开发者ID:TheProjecter,项目名称:microprobe,代码行数:41,代码来源:mp-announcements-create-page.php


示例18: process_request

 function process_request($request)
 {
     $userid = qa_get_logged_in_userid();
     $categoryid = mp_get_categoryid();
     $users = mp_get_category_userids($categoryid);
     $qa_content = qa_content_prepare();
     $qa_content['title'] = 'Classroom';
     $data = "<div class='mp-classroom'>";
     $data .= "<center><div class='mp-classroom-teacher'>&nbsp;</div></center>";
     $data .= "<div class='mp-classroom-users'>";
     foreach ($users as $user) {
         $userinfo = qa_db_select_with_pending(qa_db_user_account_selectspec($user['userid'], true));
         $data .= "<div class='mp-classroom-user'>";
         $data .= "<div class='mp-classroom-avatar'></div>";
         $data .= "<div class='mp-classroom-useremail'>" . qa_get_one_user_html($userinfo['handle'], false) . "</div>";
         $data .= "</div>";
     }
     $data .= "</div></div>";
     $qa_content['custom'] = $data;
     return $qa_content;
 }
开发者ID:TheProjecter,项目名称:microprobe,代码行数:21,代码来源:mp-classroom-page.php


示例19: process_request

 function process_request($request)
 {
     $qa_content = qa_content_prepare();
     $qa_content['site_title'] = "Notifications";
     $qa_content['error'] = "";
     $qa_content['suggest_next'] = "";
     $qa_content['template'] = "notifications";
     // Get the no of notifications
     $start = qa_get_start();
     $pagesize = qa_opt('qw_all_notification_page_size');
     if (!$pagesize) {
         $pagesize = 15;
     }
     $notifications_count = qw_get_notification_count(qa_get_logged_in_userid());
     $qa_content['page_links'] = qa_html_page_links(qa_request(), $start, $pagesize, $notifications_count, qa_opt('pages_prev_next'));
     if (empty($qa_content['page_links'])) {
         $qa_content['suggest_next'] = qa_html_suggest_ask();
     }
     $qa_content['custom'] = $this->opt_form();
     return $qa_content;
 }
开发者ID:rahularyan,项目名称:dude-theme,代码行数:21,代码来源:notification-page.php


示例20: qa_q_list_page_content

function qa_q_list_page_content($questions, $pagesize, $start, $count, $sometitle, $nonetitle, $navcategories, $categoryid, $categoryqcount, $categorypathprefix, $feedpathprefix, $suggest, $pagelinkparams = array())
{
    require_once QA_INCLUDE_DIR . 'qa-app-format.php';
    global $qa_login_userid, $qa_cookieid, $qa_request;
    // get globals from qa-page.php
    //	Chop down to size, get user information for display
    if (isset($pagesize)) {
        $questions = array_slice($questions, 0, $pagesize);
    }
    $usershtml = qa_userids_handles_html(qa_any_get_userids_handles($questions));
    //	Prepare content for theme
    $qa_content = qa_content_prepare(true, array_keys(qa_category_path($navcategories, $categoryid)));
    $qa_content['q_list']['form'] = array('tags' => 'METHOD="POST" ACTION="' . qa_self_html() . '"');
    $qa_content['q_list']['qs'] = array();
    if (count($questions)) {
        $qa_content['title'] = $sometitle;
        $options = qa_post_html_defaults('Q');
        if (isset($categorypathprefix)) {
            $options['categorypathprefix'] = $categorypathprefix;
        }
        foreach ($questions as $question) {
            $qa_content['q_list']['qs'][] = qa_any_to_q_html_fields($question, $qa_login_userid, $qa_cookieid, $usershtml, null, $options);
        }
    } else {
        $qa_content['title'] = $nonetitle;
    }
    if (isset($count) && isset($pagesize)) {
        $qa_content['page_links'] = qa_html_page_links($qa_request, $start, $pagesize, $count, qa_opt('pages_prev_next'), $pagelinkparams);
    }
    if (empty($qa_content['page_links'])) {
        $qa_content['suggest_next'] = $suggest;
    }
    if (qa_using_categories() && count($navcategories) && isset($categorypathprefix)) {
        $qa_content['navigation']['cat'] = qa_category_navigation($navcategories, $categoryid, $categorypathprefix, $categoryqcount);
    }
    if (isset($feedpathprefix) && (qa_opt('feed_per_category') || !isset($categoryid))) {
        $qa_content['feed'] = array('url' => qa_path_html(qa_feed_request($feedpathprefix . (isset($categoryid) ? '/' . qa_category_path_request($navcategories, $categoryid) : ''))), 'label' => strip_tags($sometitle));
    }
    return $qa_content;
}
开发者ID:TheProjecter,项目名称:microprobe,代码行数:40,代码来源:qa-app-q-list.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP qa_cookie_get函数代码示例发布时间:2022-05-15
下一篇:
PHP qa_clicked函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap