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


PHP selection函数代码示例

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


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

示例1: getKeyPrihod

 public function getKeyPrihod($type, $key, $date = null)
 {
     if ($key === 'grupa') {
         $keys = selection('grupe');
         $ret = array();
         foreach ($keys as $k) {
             $res = selection('proizvodi', array('pro_grupa_id' => $k['gru_id']));
             $p = $this->calcVals($type, $res, $date);
             $ret[ucfirst($k['gru_naziv'])] = $p;
         }
         return $ret;
     }
     if ($key === 'marka') {
         $keys = selection('marke');
         $ret = array();
         foreach ($keys as $k) {
             $res = selection('proizvodi', array('pro_marka_id' => $k['mar_id']));
             $p = $this->calcVals($type, $res, $date);
             $ret[ucfirst($k['mar_naziv'])] = $p;
         }
         return $ret;
     }
     if ($key === 'kat') {
         $keys = selection('kategorije');
         $ret = array();
         foreach ($keys as $k) {
             $res = selection('proizvodi', array('pro_kat_id' => $k['kat_id']));
             $p = $this->calcVals($type, $res, $date);
             $ret[ucfirst($k['kat_naziv'])] = $p;
         }
         return $ret;
     }
 }
开发者ID:vyserees,项目名称:mobile,代码行数:33,代码来源:statistics.php

示例2: getAllOrders

 public function getAllOrders()
 {
     $res = array('orders' => array(), 'list' => array());
     $res['orders'] = selection('orders', null, array('ord_id'), 'DESC');
     foreach ($res['orders'] as $o) {
         $resol = q_custom("SELECT * FROM orderlist " . "INNER JOIN proizvodi ON pro_id=oli_proizvod_id " . "AND oli_order_id=" . $o['ord_id']);
         array_push($res['list'], $resol);
     }
     return $res;
 }
开发者ID:vyserees,项目名称:mobile,代码行数:10,代码来源:dashboard.php

示例3: metaCreateForm

function metaCreateForm($metadata, $oldFilename, $real_filename)
{
    // globals
    global $course_code, $group_hidden_input;
    // lang globals
    global $langAddMetadata, $langWorkFile, $langTitle, $langTitleHelp, $langDescription, $langDescriptionHelp, $langAuthor, $langAuthorHelp, $langLanguage, $langGreek, $langEnglish, $langFrench, $langGerman, $langItalian, $langSpanish, $langLanguageHelp, $langLearningResourceType, $langLearningResourceTypeHelp, $langKeywords, $langKeywordsHelp, $langTopic, $langTopicHelp, $langSubTopic, $langSubTopicHelp, $langLevel, $langLevelHelp, $langTypicalAgeRange, $langTypicalAgeRangeHelp, $langComment, $langCommentHelp, $langCopyright, $langCopyrightHelp, $langIntentedEndUserRole, $langIntentedEndUserRoleHelp, $langOkComment, $langNotRequired;
    // variable definitions
    $metaTitle = "";
    $metaLanguage = "";
    $metaDescription = "";
    $metaAuthors = "";
    $metaKeywords = "";
    $metaRights = "";
    $metaLearningResourceTypes = "";
    $metaIntendedEndUserRoles = "";
    $metaLevels = "";
    $metaTypicalAgeRanges = "";
    $metaNotes = "";
    $metaTopic = "";
    $metaSubTopic = "";
    if (file_exists($real_filename . ".xml")) {
        $sxe = simplexml_load_file($real_filename . ".xml");
        if ($sxe) {
            $metaTitle = $sxe->general->title->string;
            $metaLanguage = $sxe->general->language;
            $metaDescription = $sxe->general->description->string;
            $metaAuthors = $sxe->lifeCycle->contribute->entity;
            $metaKeywords = $sxe->general->keyword;
            $metaRights = $sxe->rights->description->string;
            $metaLearningResourceTypes = $sxe->educational->learningResourceType;
            $metaIntendedEndUserRoles = $sxe->educational->intendedEndUserRole;
            $metaLevels = $sxe->educational->context;
            $metaTypicalAgeRanges = $sxe->educational->typicalAgeRange;
            $metaNotes = $sxe->educational->description->string;
            $metaTopic = $sxe->classification->taxonPath->source->string;
            $metaSubTopic = $sxe->classification->taxonPath->taxon->entry->string;
        }
    }
    $checkMap['meta_learningresourcetype'] = metaBuildCheckMap($metaLearningResourceTypes, "meta_learningresourcetype");
    $checkMap['meta_intendedenduserrole'] = metaBuildCheckMap($metaIntendedEndUserRoles, "meta_intendedenduserrole");
    $checkMap['meta_level'] = metaBuildCheckMap($metaLevels, "meta_level");
    $output = "\n\t<form method='post' action='index.php?course={$course_code}'>\n\t<fieldset>\n\t  <input type='hidden' name='metadataPath' value='" . q($metadata) . "' />\n\t  <input type='hidden' name='meta_filename' value='{$oldFilename}' />\n\t  <input type='hidden' name='meta_mimetype' value='" . get_mime_type($oldFilename) . "' />\n\t  {$group_hidden_input}\n\t  <legend>{$langAddMetadata}</legend>\n\t  <table class='tbl' width='100%'>\n\t  <tr>\n\t    <th>{$langWorkFile}:</th>\n\t    <td>{$oldFilename}</td>\n\t  </tr>";
    $output .= metaTextAreaRow($langTitle, "meta_title", $metaTitle, $langTitleHelp) . metaTextAreaRow($langDescription, "meta_description", $metaDescription, $langDescriptionHelp, 4) . metaCommaTextAreaRow($langAuthor, "meta_author", $metaAuthors, $langAuthorHelp);
    $cellLang = selection(array('el' => $langGreek, 'en' => $langEnglish, 'fr' => $langFrench, 'de' => $langGerman, 'it' => $langItalian, 'es' => $langSpanish), 'meta_language', $metaLanguage);
    $output .= metaFormRow($langLanguage, $cellLang, $langLanguageHelp);
    $resourceTypes = array("narrative text", "simulation", "photo", "experiment", "image", "microexperiment", "figure", "map", "diagram", "interactivemap", "graph", "exploration", "table", "interactivegame", "sound", "conceptualmap", "music", "index", "narration", "problem statement", "video", "self assessment", "animation", "questionnaire", "3danimation", "quiz", "slide", "exam", "presentation", "exercise", "lecture", "learningscenario", "textbook");
    $output .= metaCheckBoxRow($langLearningResourceType, "meta_learningresourcetype", $resourceTypes, $checkMap, $langLearningResourceTypeHelp, true) . metaCommaTextAreaRow($langKeywords, "meta_keywords", $metaKeywords, $langKeywordsHelp, 2, "string") . metaInputTextRow($langTopic, "meta_topic", $metaTopic, $langTopicHelp) . metaInputTextRow($langSubTopic, "meta_subtopic", $metaSubTopic, $langSubTopicHelp);
    $levels = array("nursery", "primary", "secondary", "highschool", "technical", "training", "higher education", "other");
    $output .= metaCheckBoxRow($langLevel, "meta_level", $levels, $checkMap, $langLevelHelp) . metaCommaInputTextRow($langTypicalAgeRange, "meta_typicalagerange", $metaTypicalAgeRanges, $langTypicalAgeRangeHelp, "string") . metaTextAreaRow($langComment, "meta_notes", $metaNotes, $langCommentHelp, 4) . metaTextAreaRow($langCopyright, "meta_rights", $metaRights, $langCopyrightHelp);
    $userRoles = array("teacher", "learner", "author", "manager", "other");
    $output .= metaCheckBoxRow($langIntentedEndUserRole, "meta_intendedenduserrole", $userRoles, $checkMap, $langIntentedEndUserRoleHelp);
    $output .= "<tr>\n\t    <th>&nbsp;</th>\n\t    <td class='right'><input class='btn btn-primary' type='submit' value='{$langOkComment}' /></td>\n\t  </tr>\n\t  <tr>\n\t    <th>&nbsp;</th>\n\t    <td class='right'>{$langNotRequired}</td>\n\t  </tr>\n\t  </table>\n\t</fieldset>\n\t</form>";
    return $output;
}
开发者ID:kostastzo,项目名称:openeclass,代码行数:54,代码来源:doc_metadata.php

示例4: logAuth

 private static function logAuth($post)
 {
     $res = selection('admini', array('adm_username' => $post['name'], 'adm_password' => md5($post['password'])));
     if (count($res) > 0) {
         session_start();
         session_regenerate_id();
         $_SESSION['ADMIN_ID'] = $res[0]['adm_id'];
         $_SESSION['ADMIN_NAME'] = $res[0]['adm_name'];
         $_SESSION['ADMIN_ROLE'] = $res[0]['adm_role'];
         header('Location: /pocetna');
     } else {
         header('Location: /home/e');
     }
 }
开发者ID:vyserees,项目名称:Shop-admin,代码行数:14,代码来源:auth.php

示例5: drawSingle

 public function drawSingle()
 {
     $res = array('proizvod' => array(), 'slike' => array());
     $id = filter_input(INPUT_POST, 'prid');
     $res['proizvod'] = q_custom("SELECT * FROM proizvodi " . "INNER JOIN marke ON pro_marka_id=mar_id " . "JOIN modeli ON pro_model_id=mod_id " . "AND pro_id=" . $id);
     $res['slike'] = selection('slike', array('sli_proizvod_id' => $id));
     echo json_encode($res);
 }
开发者ID:vyserees,项目名称:mobile,代码行数:8,代码来源:ajax.php

示例6: q

if (isset($_GET['uploadPath'])) {
    $uploadPath = q($_GET['uploadPath']);
} else {
    $uploadPath = '';
}
if ($can_upload) {
    if (isset($_GET['ext'])) {
        $group_hidden_input .= "<input type='hidden' name='ext' value='true'>";
        $pageName = $langExternalFile;
        $navigation[] = array('url' => 'index.php?course=' . $course_code, 'name' => $langDoc);
        $fileinput = "\n        <div class='form-group'>\n          <label for='fileURL' class='col-sm-2 control-label'>{$langExternalFileInfo}</label>\n          <div class='col-sm-10'>\n            <input type='text' class='form-control' id='fileURL' name='fileURL'>\n          </div>\n        </div>";
    } else {
        $pageName = $langDownloadFile;
        $navigation[] = array('url' => 'index.php?course=' . $course_code, 'name' => $langDoc);
        $fileinput = "\n        <div class='form-group'>\n          <label for='userFile' class='col-md-6 control-label'>{$langPathUploadFile}</label>\n          <div class='col-md-3'>\n            <input type='file' id='userFile' name='userFile'>\n          </div>\n        </div>";
    }
    $tool_content .= action_bar(array(array('title' => $langBack, 'url' => "index.php?course={$course_code}", 'icon' => 'fa-reply', 'level' => 'primary-label')));
    $tool_content .= "\n        <div class='row margin-top-fat'>\n            <div class='col-md-12'>\n                <div class='form-wrapper'>\n\n        <form class='form-horizontal' role='form' action='{$upload_target_url}' method='post' enctype='multipart/form-data'>      \n          <input type='hidden' name='uploadPath' value='{$uploadPath}' />\n          {$group_hidden_input}\n          {$fileinput}\n              \n      <hr class='margin-bottom-fat'/>\n      <div class='form-group'>\n        <label for='inputFileTitle' class='col-sm-2 control-label'>{$langTitle}</label>\n        <div class='col-sm-10'>\n          <input type='text' class='form-control' id='inputFileTitle' name='file_title'>\n        </div>\n      </div>\n\n      <div class='form-group'>\n        <label for='inputFileComment' class='col-sm-2 control-label'>{$langComment}</label>\n        <div class='col-sm-10'>\n          <input type='text' class='form-control' id='inputFileComment' name='file_comment'>\n        </div>\n      </div>\n\n      <div class='form-group'>\n        <label for='inputFileCategory' class='col-sm-2 control-label'>{$langCategory}</label>\n        <div class='col-sm-10'>\n          <select class='form-control' name='file_category'>\n            <option selected='selected' value='0'>{$langCategoryOther}</option>\n            <option value='1'>{$langCategoryExcercise}</option>\n            <option value='2'>{$langCategoryLecture}</option>\n            <option value='3'>{$langCategoryEssay}</option>\n            <option value='4'>{$langCategoryDescription}</option>\n            <option value='5'>{$langCategoryExample}</option>\n            <option value='6'>{$langCategoryTheory}</option>\n          </select>\n        </div>\n\n        <input type='hidden' name='file_creator' value='" . q($_SESSION['givenname']) . " " . q($_SESSION['surname']) . "' size='40' />\n\n      </div>\n\n      <div class='form-group'>\n        <label for='inputFileSubject' class='col-sm-2 control-label'>{$langSubject}</label>\n        <div class='col-sm-10'>\n          <input type='text' class='form-control' id='inputFileSubject' name='file_subject'>\n        </div>\n      </div>\n\n      <div class='form-group'>\n        <label for='inputFileDescription' class='col-sm-2 control-label'>{$langDescription}</label>\n        <div class='col-sm-10'>\n          <input type='text' class='form-control' id='inputFileDescription' name='file_description'>\n        </div>\n      </div>\n\n      <div class='form-group'>\n        <label for='inputFileAuthor' class='col-sm-2 control-label'>{$langAuthor}</label>\n        <div class='col-sm-10'>\n          <input type='text' class='form-control' id='inputFileAuthor' name='file_author'>\n        </div>\n      </div>\n\n      <div class='form-group'>\n        <input type='hidden' name='file_date' value='' size='40' />\n        <input type='hidden' name='file_format' value='' size='40' />\n\n        <label for='inputFileLanguage' class='col-sm-2 control-label'>{$langLanguage}</label>\n        <div class='col-sm-10'>\n          <select class='form-control' name='file_language'>\n                <option value='en'>{$langEnglish}</option>\n                <option value='fr'>{$langFrench}</option>\n                <option value='de'>{$langGerman}</option>\n                <option value='el' selected>{$langGreek}</option>\n                <option value='it'>{$langItalian}</option>\n                <option value='es'>{$langSpanish}</option>\n            </select>\n        </div>\n      </div>\n\n      <div class='form-group'>\n        <label for='inputFileCopyright' class='col-sm-2 control-label'>{$langCopyrighted}</label>\n        <div class='col-sm-10'>\n          " . selection(array('0' => $langCopyrightedUnknown, '2' => $langCopyrightedFree, '1' => $langCopyrightedNotFree, '3' => $langCreativeCommonsCCBY, '4' => $langCreativeCommonsCCBYSA, '5' => $langCreativeCommonsCCBYND, '6' => $langCreativeCommonsCCBYNC, '7' => $langCreativeCommonsCCBYNCSA, '8' => $langCreativeCommonsCCBYNCND), 'file_copyrighted', '', 'class="form-control"') . "\n        </div>\n      </div>";
    if (!isset($_GET['ext'])) {
        $tool_content .= "\n        <div class='form-group'>\n          <label for='inputFileCompression' class='col-md-5 col-sm-5 col-xs-10 control-label'>{$langUncompress}</label>\n          <div class='col-md-1 col-sm-1 col-xs-2'>\n            <div class='checkbox pull-right'>\n                <input type='checkbox' name='uncompress' value='1'>\n            </div>\n          </div>\n        </div>";
    }
    $tool_content .= "\n      <div class='form-group'>\n        <label for='inputFileReplaceSameName' class='col-md-5 col-sm-5 col-xs-10 control-label'>{$langReplaceSameName}</label>\n        <div class='col-md-1 col-sm-1 col-xs-2'>\n          <div class='checkbox pull-right'>\n              <input type='checkbox' name='replace' value='1'>\n          </div>\n        </div>\n      </div>      \n\n<div class='infotext-sm margin-bottom-thin'>{$langNotRequired}<br />{$langMaxFileSize} " . ini_get('upload_max_filesize') . "</div>";
    $tool_content .= "\n      <div class='form-group'>\n        <div class='col-sm-offset-5 col-sm-12'>\n          <button type='submit' class='btn btn-primary'>\n            <i class='fa fa-arrow-up space-after-icon'></i>\n            {$langUpload}\n          </button>\n          <a class='btn btn-default' href='index.php?course={$course_code}'>{$langCancel}</a>\n        </div>\n      </div>\n    </form>\n\n    </div></div></div>";
} else {
    $tool_content .= "<div class='alert alert-warning'>{$langNotAllowed}</div>";
}
if (defined('COMMON_DOCUMENTS')) {
    draw($tool_content, 3);
} else {
    draw($tool_content, 2);
}
开发者ID:kostastzo,项目名称:openeclass,代码行数:31,代码来源:upload.php

示例7: lang_select_options

function lang_select_options($name, $onchange_js = '', $default_langcode = false)
{
    global $session;
    if ($default_langcode === false) {
        $default_langcode = $session->language;
    }
    return selection($session->native_language_names, $name, $default_langcode, $onchange_js);
}
开发者ID:nikosv,项目名称:openeclass,代码行数:8,代码来源:baseTheme.php

示例8: isset

$am = isset($_GET['am']) ? $_GET['am'] : '';
$verified_mail = isset($_GET['verified_mail']) ? intval($_GET['verified_mail']) : 3;
$user_type = isset($_GET['user_type']) ? intval($_GET['user_type']) : '';
$auth_type = isset($_GET['auth_type']) ? intval($_GET['auth_type']) : '';
$email = isset($_GET['email']) ? mb_strtolower(trim($_GET['email'])) : '';
$reg_flag = isset($_GET['reg_flag']) ? intval($_GET['reg_flag']) : '';
$user_registered_at = isset($_GET['user_registered_at']) ? $_GET['user_registered_at'] : '';
if (isset($_GET['department'])) {
    $depts_defaults = array('params' => 'name="department"', 'tree' => array('0' => $langAllFacultes), 'useKey' => 'id', 'multiple' => false, 'defaults' => array_map('intval', $_GET['department']));
} else {
    $depts_defaults = array('params' => 'name="department"', 'tree' => array('0' => $langAllFacultes), 'useKey' => 'id', 'multiple' => false);
}
if (isDepartmentAdmin()) {
    $allowables = array('allowables' => $user->getDepartmentIds($uid));
    $depts_defaults = array_merge($depts_defaults, $allowables);
}
// Display Actions Toolbar
$tool_content .= action_bar(array(array('title' => $langAllUsers, 'url' => "listusers.php?search=yes", 'icon' => 'fa-search', 'level' => 'primary-label'), array('title' => $langInactiveUsers, 'url' => "listusers.php?search=inactive", 'icon' => 'fa-search', 'level' => 'primary-label'), array('title' => $langBack, 'url' => "index.php", 'icon' => 'fa-reply', 'level' => 'primary')));
//Preparing form data
$usertype_data = array(0 => $langAllUsers, USER_TEACHER => $langTeacher, USER_STUDENT => $langStudent, USER_GUEST => $langGuest);
$verified_mail_data = array(EMAIL_VERIFICATION_REQUIRED => $m['pending'], EMAIL_VERIFIED => $m['yes'], EMAIL_UNVERIFIED => $m['no'], 3 => $langAllUsers);
$authtype_data = $auth_ids;
$authtype_data[0] = $langAllAuthTypes;
$tree = new Hierarchy();
list($js, $html) = $tree->buildNodePicker($depts_defaults);
$head_content .= $js;
// display the search form
$tool_content .= "\n<div class='form-wrapper'>\n<form class='form-horizontal' role='form' action='listusers.php' method='get' name='user_search'>\n<fieldset>\n    <div class='form-group'>\n        <label for='fname' class='col-sm-2 control-label'>{$langName}:</label>\n        <div class='col-sm-10'>\n            <input class='form-control' type='text' name='fname' id='fname' value='" . q($fname) . "'>\n        </div>\n    </div>\n    <div class='form-group'>\n        <label for='lname' class='col-sm-2 control-label'>{$langSurname}:</label>\n        <div class='col-sm-10'>\n            <input class='form-control' type='text' name='lname' id='lname' value='" . q($lname) . "'>\n        </div>\n    </div>\n    <div class='form-group'>\n        <label for='am' class='col-sm-2 control-label'>{$langAm}:</label>\n        <div class='col-sm-10'>\n            <input class='form-control' type='text' name='am' id='am' value='" . q($am) . "'>\n        </div>\n    </div>\n    <div class='form-group'>\n        <label class='col-sm-2 control-label'>{$langUserType}:</label>\n        <div class='col-sm-10'>\n            " . selection($usertype_data, 'user_type', 0, 'class="form-control"') . "\n        </div>\n    </div>\n    <div class='form-group'>\n        <label class='col-sm-2 control-label'>{$langAuthMethod}:</label>\n        <div class='col-sm-10'>\n            " . selection($authtype_data, 'auth_type', 0, 'class="form-control"') . "\n        </div>\n    </div>\n    <div class='form-group'>\n        <label class='col-sm-2 control-label'>{$langRegistrationDate}:</label>\n        <div class='col-sm-5'>\n            " . selection(array('1' => $langAfter, '2' => $langBefore), 'reg_flag', $reg_flag, 'class="form-control"') . "\n        </div>\n        <div class='col-sm-5'>       \n            <input class='form-control' name='user_registered_at' id='id_user_registered_at' type='text' value='{$user_registered_at}' data-date-format='dd-mm-yyyy' placeholder='{$langRegistrationDate}'>\n        </div>   \n    </div>\n    <div class='form-group'>\n        <label class='col-sm-2 control-label'>{$langEmailVerified}:</label>\n        <div class='col-sm-10'>\n            " . selection($verified_mail_data, 'verified_mail', $verified_mail, 'class="form-control"') . "\n        </div>\n    </div>\n    <div class='form-group'>\n        <label for='email' class='col-sm-2 control-label'>{$langEmail}:</label>\n        <div class='col-sm-10'>\n            <input class='form-control' type='text' name='email' id='email' value='" . q($email) . "'>\n        </div>\n    </div>  \n    <div class='form-group'>\n        <label for='uname' class='col-sm-2 control-label'>{$langUsername}:</label>\n        <div class='col-sm-10'>\n            <input class='form-control' type='text' name='uname' id='uname' value='" . q($uname) . "'>\n        </div>\n    </div>\n    <div class='form-group'>\n        <label for='dialog-set-value' class='col-sm-2 control-label'>{$langFaculty}:</label>\n        <div class='col-sm-10'>\n            {$html}\n        </div>\n    </div>\n    <div class='form-group'>\n        <label for='search_type' class='col-sm-2 control-label'>{$langSearchFor}:</label>\n        <div class='col-sm-10'>\n            <select class='form-control' name='search_type' id='search_type'>\n              <option value='exact'>{$langSearchExact}</option>\n              <option value='begin'>{$langSearchStartsWith}</option>\n              <option value='contains' selected>{$langSearchSubstring}</option>\n            </select>\n        </div>\n    </div>\n    <div class='form-group'>\n        <div class='col-sm-10 col-sm-offset-2'>\n            <div class='checkbox'>\n              <label>\n                <input type='checkbox' name='search' value='inactive'{$inactive_checked}>\n                {$langInactiveUsers}\n              </label>\n            </div> \n        </div>\n    </div>    \n    <div class='form-group'>\n        <div class='col-sm-10 col-sm-offset-2'>\n            <input class='btn btn-primary' type='submit' value='{$langSearch}'>\n            <a class='btn btn-default' href='index.php'>{$langCancel}</a>\n        </div>\n    </div>\n</fieldset>\n</form></div>";
// end form
// display administrator menu
draw($tool_content, 3, null, $head_content);
开发者ID:kostastzo,项目名称:openeclass,代码行数:31,代码来源:search_user.php

示例9: explode

 } else {
     $grSel = "";
     $enSel = "selected";
 }
 $active_ui_languages = explode(' ', get_config('active_ui_languages'));
 $langdirs = active_subdirs($webDir . '/lang', 'messages.inc.php');
 $sel = array();
 $cbox_dont_display_login_form = get_config('dont_display_login_form') ? 'checked' : '';
 foreach ($language_codes as $langcode => $langname) {
     if (in_array($langcode, $langdirs)) {
         $loclangname = $langNameOfLang[$langname];
         $checked = in_array($langcode, $active_ui_languages) ? ' checked' : '';
         $sel[] = "<div class='checkbox'>\n                            <label>\n                                <input type='checkbox' name='av_lang[]' value='{$langcode}'{$checked}>\n                                {$loclangname}\n                            </label>\n                        </div>";
     }
 }
 $tool_content .= "<div class='panel panel-default' id='three'>\n                <div class='panel-heading'>\n                    <h2 class='panel-title'>{$langEclassThemes}</h2>\n                </div>\n                <div class='panel-body'>\n                    <fieldset>\n                        <div class='form-group'>\n                           <label for='default_language' class='col-sm-3 control-label'>{$langMainLang}: </label>\n                           <div class='col-sm-9'>\n                                <select class='form-control' name='default_language' id='default_language'>\n                                    <option value='el' {$grSel}>{$langGreek}</option>\n                                    <option value='en' {$enSel}>{$langEnglish}</option>\n                                </select>                                \n                           </div>\n                        </div> \n                        <div class='form-group'>\n                            <label class='col-sm-3 control-label'>{$langSupportedLanguages}:</label>\n                            <div class='col-sm-9'>            \n                            " . implode(' ', $sel) . "\n                            </div>\n                        </div>\n                        <div class='form-group'>\n                           <label for='theme' class='col-sm-3 control-label'>{$langThemes}: </label>\n                           <div class='col-sm-9'>\n                                " . selection($available_themes, 'theme', array_search($theme, $available_themes), "class='form-control' id='theme'") . "                               \n                           </div>\n                        </div>\n                        <div class='form-group'>\n                           <label for='theme' class='col-sm-3 control-label'>{$lang_login_form}: </label>\n                           <div class='col-sm-9'>\n                                <div class='checkbox'>\n                                    <label>\n                                        <input type='checkbox' name='dont_display_login_form' value='1' {$cbox_dont_display_login_form}>    \n                                        {$lang_dont_display_login_form}\n                                    </label>\n                                </div>                              \n                           </div>\n                        </div>                        \n                    </fieldset>\n                </div>\n            </div>";
 $cbox_dont_mail_unverified_mails = get_config('dont_mail_unverified_mails') ? 'checked' : '';
 $cbox_email_from = get_config('email_from') ? 'checked' : '';
 $tool_content .= "\n            <div class='panel panel-default' id='four'>\n                <div class='panel-heading'>\n                    <h2 class='panel-title'>{$langEmailSettings}</h2>\n                </div>\n                <div class='panel-body'>\n                    <fieldset>\n                        <div class='form-group'>\n                           <div class='col-sm-12'>\n                                <div class='checkbox'>\n                                    <label>\n                                        <input type='checkbox' name='dont_mail_unverified_mails' value='1' {$cbox_dont_mail_unverified_mails}>    \n                                        {$lang_dont_mail_unverified_mails}\n                                    </label>\n                                </div>\n                                <div class='checkbox'>\n                                    <label>\n                                        <input type='checkbox' name='email_from' value='1' {$cbox_email_from}>    \n                                        {$lang_email_from}\n                                    </label>\n                                </div>                                  \n                           </div>\n                        </div>                        \n                    </fieldset>\n                </div>\n            </div>";
 $cbox_course_multidep = get_config('course_multidep') ? 'checked' : '';
 $cbox_user_multidep = get_config('user_multidep') ? 'checked' : '';
 $cbox_restrict_owndep = get_config('restrict_owndep') ? 'checked' : '';
 $cbox_restrict_teacher_owndep = get_config('restrict_teacher_owndep') ? 'checked' : '';
 $town_dis = get_config('restrict_owndep') ? '' : 'disabled';
 $cbox_insert_xml_metadata = get_config('insert_xml_metadata') ? 'checked' : '';
 $cbox_course_metadata = get_config('course_metadata') ? 'checked' : '';
 $cbox_opencourses_enable = get_config('opencourses_enable') ? 'checked' : '';
 $tool_content .= "\n            <div class='panel panel-default' id='five'>\n                <div class='panel-heading'>\n                    <h2 class='panel-title'>{$langCourseSettings}</h2>\n                </div>\n                <div class='panel-body'>\n                    <fieldset>\n                        <div class='form-group'>\n                           <div class='col-sm-12'>\n                                <div class='checkbox'>\n                                    <label>\n                                        <input type='checkbox' name='course_multidep' value='1' {$cbox_course_multidep}>\n                                        {$lang_course_multidep}\n                                    </label>\n                                </div>\n                                <div class='checkbox'>\n                                    <label>\n                                        <input type='checkbox' name='user_multidep' value='1' {$cbox_user_multidep}>\n                                        {$lang_user_multidep}\n                                    </label>\n                                </div>\n                                <div class='checkbox'>\n                                    <label>\n                                        <input id='uown' type='checkbox' name='restrict_owndep' value='1' {$cbox_restrict_owndep}>\n                                        {$lang_restrict_owndep}\n                                    </label>\n                                </div>\n                                <div class='checkbox'>\n                                    <label>\n                                        <input id='town' type='checkbox' name='restrict_teacher_owndep' value='1' {$town_dis} {$cbox_restrict_teacher_owndep}>\n                                        {$lang_restrict_teacher_owndep}\n                                    </label>\n                                </div>                                  \n                           </div>\n                        </div>                        \n                    </fieldset>\n                </div>\n            </div>\n            <div class='panel panel-default' id='six'>\n                <div class='panel-heading'>\n                    <h2 class='panel-title'>{$langMetaCommentary}</h2>\n                </div>\n                <div class='panel-body'>\n                    <fieldset>\n                        <div class='form-group'>\n                           <div class='col-sm-12'>\n                                <div class='checkbox'>\n                                    <label>\n                                        <input type='checkbox' name='insert_xml_metadata' value='1' {$cbox_insert_xml_metadata}>\n                                        {$lang_insert_xml_metadata}\n                                    </label>\n                                </div>\n                                <div class='checkbox'>\n                                    <label>\n                                        <input type='checkbox' id='course_metadata' name='course_metadata' value='1' {$cbox_course_metadata}>\n                                        {$lang_course_metadata}\n                                    </label>\n                                </div>\n                                <div class='checkbox'>\n                                    <label>\n                                        <input type='checkbox' id='opencourses_enable' name='opencourses_enable' value='1' {$cbox_opencourses_enable}>\n                                        {$lang_opencourses_enable}\n                                    </label>\n                                </div>                                  \n                            </div>\n                        </div>\n                    </fieldset>\n                </div>\n            </div>";
 $cbox_case_insensitive_usernames = get_config('case_insensitive_usernames') ? 'checked' : '';
 $cbox_email_required = get_config('email_required') ? 'checked' : '';
 $cbox_email_verification_required = get_config('email_verification_required') ? 'checked' : '';
开发者ID:kostastzo,项目名称:openeclass,代码行数:31,代码来源:eclassconf.php

示例10: is_null

         $category_id = is_null($data->category_id) ? 'none' : $data->category_id;
     }
     $submit_value = $langModify;
 }
 $term = Session::has('term') ? Session::get('term') : ( isset($_GET['add']) ? "" : q($data->term) );
 $url = Session::has('url') ? Session::get('url') : ( isset($_GET['add']) ? "" : q($data->url) );
 $definition = Session::has('definition') ? Session::get('definition') : (isset($_GET['add']) ? "" : $data->definition );
 $notes = Session::has('notes') ? Session::get('notes') : (isset($_GET['add']) ? "" : $data->notes );
 if ($categories) {
     $categories[0] = '-';
     $indirectcategories[0] = '-';
     $category_selection = "
                 <div class='form-group'>
                      <label for='category_id' class='col-sm-2 control-label'>$langCategory: </label>
                      <div class='col-sm-10'>
                          " . selection($indirectcategories, 'category_id', ($category_id), 'class="form-control"') . "
                      </div>
                 </div>";
     unset($categories['none']);
     unset($indirectcategories['none']);
 } else {
     $category_selection = '';
 }
 
 $tool_content .= "
     <div class='form-wrapper'>
         <form class='form-horizontal' role='form' action='$edit_url' method='post'>
           $html_id
            <div class='form-group".(Session::getError('term') ? " has-error" : "")."'>
                 <label for='term' class='col-sm-2 control-label'>$langGlossaryTerm: </label>
                 <div class='col-sm-10'>
开发者ID:nikosv,项目名称:openeclass,代码行数:31,代码来源:index.php

示例11: selection_input

function selection_input($entries, $name) {
    $GLOBALS['input_fields'][$name] = true;
    return selection($entries, $name, q($GLOBALS[$name]), "class='form-control'");
}
开发者ID:nikosv,项目名称:openeclass,代码行数:4,代码来源:index.php

示例12: selection

           <label>
             <input type='radio' name='l_radio' value='10'$license_checked[10]$disabledVisibility>
             {$license[10]['title']}
           </label>
         </div>
         <div class='radio'>
           <label>
             <input id='cc_license' type='radio' name='l_radio' value='cc'$cc_checked$disabledVisibility>
             $langCMeta[course_license]
           </label>
         </div>                         
     </div>                    
 </div>
 <div class='form-group'>
     <div class='col-sm-10 col-sm-offset-2' id='cc'>            
         " . selection($cc_license, 'cc_use', $course_license, 'class="form-control"'.$disabledVisibility) . "
     </div>
 </div>
 <div class='form-group'>
     <label class='col-sm-2 control-label'>$langConfidentiality:</label>
     <div class='col-sm-10'>
         <div class='radio'>
           <label>
             <input id='courseopen' type='radio' name='formvisible' value='2' $visibleChecked[2]>
             <img src='$themeimg/lock_open.png' alt='$langOpenCourse' title='$langOpenCourse' width='16'>&nbsp;$langOpenCourse
             <span class='help-block'><small>$langPublic</small></span>
           </label>
         </div>
         <div class='radio'>
           <label>
             <input id='coursewithregistration' type='radio' name='formvisible' value='1' $visibleChecked[1]>
开发者ID:nikosv,项目名称:openeclass,代码行数:31,代码来源:index.php

示例13: validateUploadedFile

        validateUploadedFile($file_name, 2);
        $i = 0;
        while (is_file("{$webDir}/courses/{$course_code}/image/{$file_name}")) {
            $i++;
            $name = pathinfo($file_name, PATHINFO_FILENAME);
            $ext = get_file_extension($file_name);
            $file_name = "{$name}-{$i}.{$ext}";
        }
        move_uploaded_file($_FILES['course_image']['tmp_name'], "{$webDir}/courses/{$course_code}/image/{$file_name}");
        $extra_sql = ", course_image = ?s";
        array_push($db_vars, $file_name);
    }
    array_push($db_vars, $course_id);
    Database::get()->query("UPDATE course SET description = ?s, home_layout = ?d{$extra_sql} WHERE id = ?d", $db_vars);
    // update index
    require_once 'modules/search/indexer.class.php';
    Indexer::queueAsync(Indexer::REQUEST_STORE, Indexer::RESOURCE_COURSE, $course_id);
    header("Location: {$urlServer}courses/{$course_code}");
    exit;
}
$head_content .= "\n    <script>\n        \$(function(){\n            \$('select[name=layout]').change(function ()\n            {\n                if(\$(this).val() == 1) {\n                    \$('#image_field').removeClass('hidden');\n                } else {\n                    \$('#image_field').addClass('hidden');\n                }\n            });          \n        });\n    </script>";
$layouts = array(1 => $langCourseLayout1, 2 => $langCourseLayout2, 3 => $langCourseLayout3);
$description = $course->description;
$layout = $course->home_layout;
if (isset($course->course_image)) {
    $course_image = "\n        <img src='{$urlAppend}courses/{$course_code}/image/{$course->course_image}' style='max-height:100px;max-width:150px;'> &nbsp&nbsp<a class='btn btn-xs btn-danger' href='{$_SERVER['SCRIPT_NAME']}?delete_image=true'>{$langDelete}</a>\n        <input type='hidden' name='course_image' value='{$course->course_image}'>\n    ";
} else {
    $course_image = "<input type='file' name='course_image' id='course_image'>";
}
$tool_content = action_bar(array(array('title' => $langBack, 'url' => $urlAppend . "courses/" . $course_code, 'icon' => 'fa-reply', 'level' => 'primary-label'))) . "\n    <div class='row'>\n        <div class='col-xs-12'>\n            <div class='form-wrapper'>\n                <form class='form-horizontal' role='form' method='post' action='editdesc.php?course={$course_code}' enctype='multipart/form-data'>\n                    <fieldset>\n                    <div class='form-group'>\n                        <label for='description' class='col-sm-2 control-label'>{$langCourseLayout}:</label>\n                        <div class='col-sm-10'>\n                            " . selection($layouts, 'layout', $layout, 'class="form-control"') . "\n                        </div>\n                    </div>\n                    <div id='image_field' class='form-group" . ($layout == 1 ? "" : " hidden") . "'>\n                        <label for='course_image' class='col-sm-2 control-label'>{$langCourseImage}:</label>\n                        <div class='col-sm-10'>\n                            {$course_image}\n                        </div>\n                    </div>                  \n                    <div class='form-group'>\n                        <label for='description' class='col-sm-2 control-label'>{$langDescription}:</label>\n                        <div class='col-sm-10'>\n                            " . rich_text_editor('description', 8, 20, $description) . "\n                        </div>\n                    </div>\n                    <div class='form-group'>\n                        <div class='col-sm-10 col-sm-offset-2'>\n                            <input class='btn btn-primary' type='submit' name='submit' value='{$langSubmit}'>\n                            <a href='{$urlAppend}courses/{$course_code}' class='btn btn-default'>{$langCancel}</a>\n                        </div>\n                    </div>\n                  </fieldset>\n                </form>\n    </div></div></div>";
draw($tool_content, 2, null, $head_content);
开发者ID:kostastzo,项目名称:openeclass,代码行数:31,代码来源:editdesc.php

示例14: selection

?>
_kandidaten.jpg" border="0" /></div>
		<div class="menu_item" onclick="ajaxget('refresh', 'ajax/inc_refresh.php?p=opdrachtgevers');"><img src="gfx/buttons/<?php 
echo selection("opdrachtgevers") . $language;
?>
_opdrachtgevers.jpg" border="0" /></div>
		<div class="menu_item" onclick="ajaxget('refresh', 'ajax/inc_refresh.php?p=referenties');"><img src="gfx/buttons/<?php 
echo selection("referenties") . $language;
?>
_referenties.jpg" border="0" /></div>
		<div class="menu_item" onclick="ajaxget('refresh', 'ajax/inc_refresh.php?p=biografie');"><img src="gfx/buttons/<?php 
echo selection("biografie") . $language;
?>
_biografie.jpg" border="0" /></div>
		<div class="menu_item" onclick="ajaxget('refresh', 'ajax/inc_refresh.php?p=contact');"><img src="gfx/buttons/<?php 
echo selection("contact") . $language;
?>
_contact.jpg" border="0" /></div>
	
		<div id="language">
			<div class="language_btn" onclick="location.href='index.php?language=nl';"><img src="gfx/nl.jpg" border="0" /></div>
			<div class="language_btn" onclick="location.href='index.php?language=en';"><img src="gfx/en.jpg" border="0" /></div>
		</div>

	</div>
</div>

<div id="center">
	<?php 
if (!isset($_GET['p'])) {
    //	$_GET['p'] = "home";
开发者ID:TimvanSteenbergen,项目名称:rethmeier,代码行数:31,代码来源:inc_refresh.php

示例15: show_submission_form

function show_submission_form($id, $user_group_info, $on_behalf_of = false)
{
    global $tool_content, $m, $langWorkFile, $langSendFile, $langSubmit, $uid, $langNotice3, $gid, $is_member, $urlAppend, $langGroupSpaceLink, $langOnBehalfOf, $course_code, $langBack, $is_editor, $langCancel;
    $group_select_hidden_input = $group_select_form = '';
    $is_group_assignment = is_group_assignment($id);
    if ($is_group_assignment) {
        if (!$on_behalf_of) {
            if (count($user_group_info) == 1) {
                $gids = array_keys($user_group_info);
                $group_link = $urlAppend . '/modules/group/document.php?gid=' . $gids[0];
                $group_select_hidden_input = "<input type='hidden' name='group_id' value='{$gids['0']}' />";
            } elseif ($user_group_info) {
                $group_select_form = "\n                        <div class='form-group'>\n                            <label for='userfile' class='col-sm-2 control-label'>{$langGroupSpaceLink}:</label>\n                            <div class='col-sm-10'>\n                              " . selection($user_group_info, 'group_id') . "\n                            </div>\n                        </div>";
            } else {
                $group_link = $urlAppend . 'modules/group/';
                $tool_content .= "<div class='alert alert-warning'>{$m['this_is_group_assignment']} <br />" . sprintf(count($user_group_info) ? $m['group_assignment_publish'] : $m['group_assignment_no_groups'], $group_link) . "</p>\n";
            }
        } else {
            $groups_with_no_submissions = groups_with_no_submissions($id);
            if (count($groups_with_no_submissions) > 0) {
                $group_select_form = "\n                        <div class='form-group'>\n                            <label for='userfile' class='col-sm-2 control-label'>{$langGroupSpaceLink}:</label>\n                            <div class='col-sm-10'>\n                              " . selection($groups_with_no_submissions, 'group_id') . "\n                            </div>\n                        </div>";
            } else {
                Session::Messages($m['NoneWorkGroupNoSubmission'], 'alert-danger');
                redirect_to_home_page('modules/work/index.php?course=' . $course_code . '&id=' . $id);
            }
        }
    } elseif ($on_behalf_of) {
        $users_with_no_submissions = users_with_no_submissions($id);
        if (count($users_with_no_submissions) > 0) {
            $group_select_form = "\n                        <div class='form-group'>\n                            <label for='userfile' class='col-sm-2 control-label'>{$langOnBehalfOf}:</label>\n                            <div class='col-sm-10'>\n                              " . selection($users_with_no_submissions, 'user_id', '', "class='form-control'") . "\n                            </div>\n                        </div>";
        } else {
            Session::Messages($m['NoneWorkUserNoSubmission'], 'alert-danger');
            redirect_to_home_page('modules/work/index.php?course=' . $course_code . '&id=' . $id);
        }
    }
    $notice = $on_behalf_of ? '' : "<div class='alert alert-info'>" . icon('fa-info-circle') . " {$langNotice3}</div>";
    $extra = $on_behalf_of ? "\n                        <div class='form-group'>\n                            <label for='userfile' class='col-sm-2 control-label'>{$m['grade']}:</label>\n                            <div class='col-sm-10'>\n                              <input class='form-control' type='text' name='grade' maxlength='3' size='3'> ({$m['max_grade']}:)\n                              <input type='hidden' name='on_behalf_of' value='1'>\n                            </div>\n                        </div>\n                        <div class='form-group'>\n                            <div class='col-sm-10 col-sm-offset-2'>\n                                <div class='checkbox'>\n                                  <label>\n                                    <input type='checkbox' name='email' id='email_button' value='1'>\n                                    {$m['email_users']}\n                                  </label>\n                                </div>\n                            </div>\n                        </div>" : '';
    if (!$is_group_assignment || count($user_group_info) || $on_behalf_of) {
        $back_link = $is_editor ? "index.php?course={$course_code}&id={$id}" : "index.php?course={$course_code}";
        $tool_content .= action_bar(array(array('title' => $langBack, 'icon' => 'fa-reply', 'level' => 'primary-label', 'url' => "index.php?course={$course_code}&id={$id}", 'show' => $is_editor))) . "\n                    {$notice}\n                    <div class='form-wrapper'>\n                     <form class='form-horizontal' role='form' enctype='multipart/form-data' action='{$_SERVER['SCRIPT_NAME']}?course={$course_code}' method='post'>\n                        <input type='hidden' name='id' value='{$id}' />{$group_select_hidden_input}\n                        <fieldset>\n                        {$group_select_form}\n                        <div class='form-group'>\n                            <label for='userfile' class='col-sm-2 control-label'>{$langWorkFile}:</label>\n                            <div class='col-sm-10'>\n                              <input type='file'  name='userfile' id='userfile'>\n                            </div>\n                        </div>\n                        <div class='form-group'>\n                            <label for='stud_comments' class='col-sm-2 control-label'>{$m['comments']}:</label>\n                            <div class='col-sm-10'>\n                              <textarea class='form-control' name='stud_comments' id='stud_comments' rows='5'></textarea>\n                            </div>\n                        </div>\n                        {$extra}\n                        <div class='form-group'>\n                            <div class='col-sm-10 col-sm-offset-2'>\n                                <input class='btn btn-primary' type='submit' value='{$langSubmit}' name='work_submit'>\n                                <a class='btn btn-default' href='{$back_link}'>{$langCancel}</a>\n                            </div>\n                        </div>\n                        </fieldset>\n                     </form>\n                     </div>\n                     <div class='pull-right'><small>{$GLOBALS['langMaxFileSize']} " . ini_get('upload_max_filesize') . "</small></div><br>";
    }
}
开发者ID:kostastzo,项目名称:openeclass,代码行数:42,代码来源:index.php


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