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


PHP mosHTML::yesnoradioList方法代码示例

本文整理汇总了PHP中mosHTML::yesnoradioList方法的典型用法代码示例。如果您正苦于以下问题:PHP mosHTML::yesnoradioList方法的具体用法?PHP mosHTML::yesnoradioList怎么用?PHP mosHTML::yesnoradioList使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在mosHTML的用法示例。


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

示例1: editContact

/**
* Creates a new or edits and existing user record
* @param int The id of the record, 0 if a new entry
* @param string The current GET/POST option
*/
function editContact($id, $option)
{
    global $database, $my;
    global $mosConfig_absolute_path;
    $row = new mosContact($database);
    // load the row from the db table
    $row->load($id);
    if ($id) {
        // do stuff for existing records
        $row->checkout($my->id);
    } else {
        // do stuff for new records
        $row->imagepos = 'top';
        $row->ordering = 0;
        $row->published = 1;
    }
    $lists = array();
    // build the html select list for ordering
    $query = "SELECT ordering AS value, name AS text" . "\n FROM #__contact_details" . "\n WHERE published >= 0" . "\n AND catid = '{$row->catid}'" . "\n ORDER BY ordering";
    $lists['ordering'] = mosAdminMenus::SpecificOrdering($row, $id, $query, 1);
    // build list of users
    $lists['user_id'] = mosAdminMenus::UserSelect('user_id', $row->user_id, 1);
    // build list of categories
    $lists['catid'] = mosAdminMenus::ComponentCategory('catid', 'com_contact_details', intval($row->catid));
    // build the html select list for images
    $lists['image'] = mosAdminMenus::Images('image', $row->image);
    // build the html select list for the group access
    $lists['access'] = mosAdminMenus::Access($row);
    // build the html radio buttons for published
    $lists['published'] = mosHTML::yesnoradioList('published', '', $row->published);
    // build the html radio buttons for default
    $lists['default_con'] = mosHTML::yesnoradioList('default_con', '', $row->default_con);
    // get params definitions
    $file = $mosConfig_absolute_path . '/administrator/components/com_contact/contact_items.xml';
    $params =& new mosAdminParameters($row->params, $file, 'component');
    HTML_contact::editcontact($row, $lists, $option, $params);
}
开发者ID:jwest00724,项目名称:mambo,代码行数:42,代码来源:admin.contact.php

示例2: JQ_editQuestion


//.........这里部分代码省略.........
                     $type_level[$i][] = mosHTML::makeOption($group->id, $group->c_category);
                 }
                 $lists['level_' . $i] = mosHTML::selectList($type_level[$i], 'level_id_' . $i, 'class="inputbox" size="1" style="width:266px;" ' . $javascript, 'value', 'text', $tmp[$i]->catid);
             }
         }
     }
     $multicat = array();
     $i = 0;
     foreach ($lists as $key => $item) {
         if (substr($key, 0, 6) == 'level_') {
             $multicat[] = $lists['level_' . $i];
             $i++;
         }
     }
     $data = new stdClass();
     $i = 0;
     foreach ($multicat as $m) {
         if (isset($level_id[$i])) {
             $str_preobj = 'level_' . $i;
             $data->{$str_preobj} = $level_id[$i];
         }
         $i++;
     }
     $lists['data'] = $data;
     //----------------------------------------------
     //echo $row->c_type; die;
     switch ($row->c_type) {
         case 1:
         case 12:
             if ($row->c_type == 12) {
                 $query = "SELECT a.*, b.imgs_name FROM #__lms_quiz_t_choice as a, #__lms_quiz_images as b WHERE a.c_question_id = '" . $row->c_id . "' AND b.imgs_id = a.c_choice ORDER BY a.ordering";
             } else {
                 $query = "SELECT * FROM #__lms_quiz_t_choice WHERE c_question_id = '" . $row->c_id . "' ORDER BY ordering";
                 $lists['random_answers'] = mosHTML::yesnoradioList('params[random_answers]', '', $params->get('random_answers', 0));
             }
             $JLMS_DB->SetQuery($query);
             $row->choices = array();
             $row->choices = $JLMS_DB->LoadObjectList();
             if ($row->c_type == 12) {
                 $query = "SELECT imgs_id, imgs_name, c_id as i_id FROM #__lms_quiz_images WHERE course_id = '" . $course_id . "'";
                 $JLMS_DB->SetQuery($query);
                 $row->images = array();
                 $row->images = $JLMS_DB->LoadObjectList();
             }
             $q_om_type = $row->c_type;
             JLMS_quiz_admin_html_class::JQ_editQuest_MChoice($row, $lists, $option, $page, $course_id, $q_om_type, $qtype_str, $params, $id, $gqp, $levels);
             break;
         case 2:
         case 13:
             if ($row->c_type == 13) {
                 $query = "SELECT a.*, b.imgs_name FROM #__lms_quiz_t_choice as a, #__lms_quiz_images as b WHERE a.c_question_id = '" . $row->c_id . "' AND b.imgs_id = a.c_choice ORDER BY a.ordering";
             } else {
                 $query = "SELECT * FROM #__lms_quiz_t_choice WHERE c_question_id = '" . $row->c_id . "' ORDER BY ordering";
                 $lists['random_answers'] = mosHTML::yesnoradioList('params[random_answers]', '', $params->get('random_answers', 0));
             }
             $JLMS_DB->SetQuery($query);
             $row->choices = array();
             $row->choices = $JLMS_DB->LoadObjectList();
             if ($row->c_type == 13) {
                 $query = "SELECT imgs_id, imgs_name, c_id as i_id FROM #__lms_quiz_images WHERE course_id = '" . $course_id . "'";
                 $JLMS_DB->SetQuery($query);
                 $row->images = array();
                 $row->images = $JLMS_DB->LoadObjectList();
             }
             $q_om_type = $row->c_type;
             JLMS_quiz_admin_html_class::JQ_editQuest_MChoice($row, $lists, $option, $page, $course_id, $q_om_type, $qtype_str, $params, $id, $gqp, $levels);
开发者ID:parkmi,项目名称:dolschool14,代码行数:67,代码来源:admin.joomlaquiz.class.php


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