Beispiel #1
0
 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;
     }
 }
Beispiel #2
0
 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;
 }
Beispiel #3
0
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;
}
Beispiel #4
0
 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');
     }
 }
Beispiel #5
0
 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);
 }
Beispiel #6
0
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);
}
Beispiel #7
0
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);
}
Beispiel #8
0
$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);
Beispiel #9
0
 } 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' : '';
Beispiel #10
0
         $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'>
Beispiel #11
0
function selection_input($entries, $name) {
    $GLOBALS['input_fields'][$name] = true;
    return selection($entries, $name, q($GLOBALS[$name]), "class='form-control'");
}
Beispiel #12
0
           <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]>
Beispiel #13
0
        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);
?>
_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";
Beispiel #15
0
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>";
    }
}
Beispiel #16
0
    if (isset($theme_options_styles['custom_logo_small'])) {
        $small_logo_field = "\n            <img src='{$themeimg}/{$theme_options_styles['custom_logo_small']}' style='max-height:100px;max-width:150px;'> &nbsp&nbsp<a class='btn btn-xs btn-danger' href='{$_SERVER['SCRIPT_NAME']}?delete_image=custom_logo_small'>{$langDelete}</a>\n            <input type='hidden' name='custom_logo_small' value='{$theme_options_styles['custom_logo_small']}'>\n        ";
    } else {
        $small_logo_field = "<input type='file' name='imageUploadSmall' id='imageUploadSmall'>";
    }
    if (isset($theme_options_styles['bgImage'])) {
        $bg_field = "\n            <img src='{$themeimg}/{$theme_options_styles['bgImage']}' style='max-height:100px;max-width:150px;'> &nbsp&nbsp<a class='btn btn-xs btn-danger' href='{$_SERVER['SCRIPT_NAME']}?delete_image=bgImage'>{$langDelete}</a>\n            <input type='hidden' name='bgImage' value='{$theme_options_styles['bgImage']}'>\n        ";
    } else {
        $bg_field = "<input type='file' name='bgImage' id='bgImage'>";
    }
    if (isset($theme_options_styles['loginImg'])) {
        $login_image_field = "\n            <img src='{$themeimg}/{$theme_options_styles['loginImg']}' style='max-height:100px;max-width:150px;'> &nbsp&nbsp<a class='btn btn-xs btn-danger' href='{$_SERVER['SCRIPT_NAME']}?delete_image=loginImg'>{$langDelete}</a>\n            <input type='hidden' name='loginImg' value='{$theme_options_styles['loginImg']}'>\n        ";
    } else {
        $login_image_field = "<input type='file' name='loginImg' id='loginImg'>";
    }
    @($tool_content .= "\n    <div class='form-wrapper'>\n        <form class='form-horizontal' role='form' action='{$_SERVER['SCRIPT_NAME']}' method='post'>\n            <div class='form-group'>\n                <label for='bgColor' class='col-sm-3 control-label'>{$langActiveThemeSettings}:</label>\n                <div class='col-sm-9'>\n                    " . selection($themes_arr, 'active_theme_options', get_config('theme_options_id'), 'class="form-control form-submit"') . "\n                </div>\n            </div>\n        </form>\n        {$delete_btn}\n    </div>\n    <div class='form-wrapper'>\n        <form id='theme_options_form' class='form-horizontal' role='form' action='{$_SERVER['SCRIPT_NAME']}' enctype='multipart/form-data' method='post'>\n            <h3>{$langGeneralSettings}</h3>\n            <div class='form-group'>\n                <label for='imageUpload' class='col-sm-3 control-label'>{$langLogo} <small>{$langLogoNormal}</small>:</label>\n                <div class='col-sm-9'>\n                   {$logo_field}\n                </div>\n            </div>\n            <div class='form-group'>\n                <label for='imageUploadSmall' class='col-sm-3 control-label'>{$langLogo} <small>{$langLogoSmall}</small>:</label>\n                <div class='col-sm-9'>\n                   {$small_logo_field}\n                </div>\n            </div>              \n            <div class='form-group'>\n              <label for='bgColor' class='col-sm-3 control-label'>{$langBgColor}:</label>\n              <div class='col-sm-9'>\n                <input name='bgColor' type='text' class='form-control colorpicker' id='bgColor' value='{$theme_options_styles['bgColor']}'>\n              </div>\n            </div>\n            <div class='form-group'>\n                <label for='imageBg' class='col-sm-3 control-label'>{$langBgImg}:</label>\n                <div class='col-sm-9'>\n                   {$bg_field}\n                </div>\n                <div class='form-inline col-sm-9 col-sm-offset-3'>\n                      <div class='radio'>\n                        <label>\n                          <input type='radio' name='bgType' value='repeat' " . ($theme_options_styles['bgType'] == 'repeat' ? 'checked' : '') . ">\n                          {$langRepeatedImg} &nbsp; \n                        </label>\n                      </div>\n                      <div class='radio'>\n                        <label>\n                          <input type='radio' name='bgType' value='stretch' " . ($theme_options_styles['bgType'] == 'stretch' ? 'checked' : '') . ">\n                          {$langStretchedImg} &nbsp;\n                        </label>\n                      </div>              \n                </div>                \n            </div>\n            <div class='form-group'>\n              <label for='loginJumbotronBgColor' class='col-sm-3 control-label'>{$langLoginBgGradient}:</label>\n              <div class='col-sm-4'>\n                <input name='loginJumbotronBgColor' type='text' class='form-control colorpicker' id='loginJumbotronBgColor' value='{$theme_options_styles['loginJumbotronBgColor']}'>\n              </div>\n              <div class='col-sm-1 text-center' style='padding-top: 7px;'>\n                <i class='hidden-xs fa fa-arrow-right'></i>\n              </div>\n              <div class='col-sm-4'>\n                <input name='loginJumbotronRadialBgColor' type='text' class='form-control colorpicker' id='loginJumbotronRadialBgColor' value='{$theme_options_styles['loginJumbotronRadialBgColor']}'>\n              </div>              \n            </div>\n            <div class='form-group'>\n                <label for='loginImg' class='col-sm-3 control-label'>{$langLoginImg}:</label>\n                <div class='col-sm-9'>\n                   {$login_image_field}\n                </div>\n            </div>               \n            <hr>\n            <h3>{$langNavSettings}</h3>            \n            <div class='form-group'>\n              <label for='leftNavBgColor' class='col-sm-3 control-label'>{$langBgColor}:</label>\n              <div class='col-sm-9'>\n                <input name='leftNavBgColor' type='text' class='form-control colorpicker' id='leftNavBgColor' value='{$theme_options_styles['leftNavBgColor']}'>\n              </div>\n            </div>\n            <div class='form-group'>\n              <label for='leftMenuBgColor' class='col-sm-3 control-label'>{$langMainMenuBgColor}:</label>\n              <div class='col-sm-9'>\n                <input name='leftMenuBgColor' type='text' class='form-control colorpicker' id='leftMenuBgColor' value='{$theme_options_styles['leftMenuBgColor']}'>\n              </div>\n            </div>             \n            <div class='form-group'>\n              <label for='leftMenuFontColor' class='col-sm-3 control-label'>{$langMainMenuLinkColor}:</label>\n              <div class='col-sm-9'>\n                <input name='leftMenuFontColor' type='text' class='form-control colorpicker' id='leftMenuFontColor' value='{$theme_options_styles['leftMenuFontColor']}'>\n              </div>\n            </div>\n            <div class='form-group'>\n              <label for='leftMenuHoverFontColor' class='col-sm-3 control-label'>{$langMainMenuLinkHoverColor}:</label>\n              <div class='col-sm-9'>\n                <input name='leftMenuHoverFontColor' type='text' class='form-control colorpicker' id='leftMenuHoverFontColor' value='{$theme_options_styles['leftMenuHoverFontColor']}'>\n              </div>\n            </div>\n            <div class='form-group'>\n              <label for='leftMenuSelectedFontColor' class='col-sm-3 control-label'>{$langMainMenuActiveLinkColor}:</label>\n              <div class='col-sm-9'>\n                <input name='leftMenuSelectedFontColor' type='text' class='form-control colorpicker' id='leftMenuSelectedFontColor' value='{$theme_options_styles['leftMenuSelectedFontColor']}'>\n              </div>\n            </div>               \n            <div class='form-group'>\n              <label for='leftSubMenuFontColor' class='col-sm-3 control-label'>{$langSubMenuLinkColor}:</label>\n              <div class='col-sm-9'>\n                <input name='leftSubMenuFontColor' type='text' class='form-control colorpicker' id='leftSubMenuFontColor' value='{$theme_options_styles['leftSubMenuFontColor']}'>\n              </div>\n            </div>\n            <div class='form-group'>\n              <label for='leftSubMenuHoverFontColor' class='col-sm-3 control-label'>{$langSubMenuLinkHoverColor}:</label>\n              <div class='col-sm-9'>\n                <input name='leftSubMenuHoverFontColor' type='text' class='form-control colorpicker' id='leftSubMenuHoverFontColor' value='{$theme_options_styles['leftSubMenuHoverFontColor']}'>\n              </div>\n            </div>                \n            <div class='form-group'>\n              <label for='leftSubMenuHoverBgColor' class='col-sm-3 control-label'>{$langSubMenuLinkBgHoverColor}:</label>\n              <div class='col-sm-9'>\n                <input name='leftSubMenuHoverBgColor' type='text' class='form-control colorpicker' id='leftSubMenuHoverBgColor' value='{$theme_options_styles['leftSubMenuHoverBgColor']}'>\n              </div>\n            </div>                                  \n            <div class='form-group'>\n                <div class='col-sm-9 col-sm-offset-3'>\n                    " . (get_config('theme_options_id') ? "<input class='btn btn-primary' name='optionsSave' type='submit' value='{$langSave}'>" : "") . "\n                    <input class='btn btn-success' name='optionsSaveAs' id='optionsSaveAs' type='submit' value='Αποθήκευση ως ...'>    \n                </div>\n            </div>        \n        </form>\n    </div>\n    ");
}
function upload_images()
{
    global $webDir, $theme;
    if (isset($_FILES['imageUpload']) && is_uploaded_file($_FILES['imageUpload']['tmp_name'])) {
        $file_name = $_FILES['imageUpload']['name'];
        validateUploadedFile($file_name, 2);
        $i = 0;
        while (is_file("{$webDir}/template/{$theme}/img/{$file_name}")) {
            $i++;
            $name = pathinfo($file_name, PATHINFO_FILENAME);
            $ext = get_file_extension($file_name);
            $file_name = "{$name}-{$i}.{$ext}";
        }
        move_uploaded_file($_FILES['imageUpload']['tmp_name'], "{$webDir}/template/{$theme}/img/{$file_name}");
}
// admin hasn't clicked on edit
if (empty($submit0) && empty($submit1) && empty($submit2)) {
    $tool_content .= "<form name='mail_verification' method='post' action='{$_SERVER['SCRIPT_NAME']}'>\n\t<table class='table-default' style='margin-top: 20px;'>\n\t\t<tr><td class='text-left' colspan='3'><b>{$langMailVerificationSettings}</b></td></tr>\n\t\t<tr><td class='text-left' colspan='2'>{$lang_email_required}:</td>\n\t\t\t<td class='text-center'>{$mr}</td></tr>\n\t\t<tr><td class='text-left' colspan='2'>{$lang_email_verification_required}:</td>\n\t\t\t<td class='text-center'>{$mv}</td></tr>\n\t\t<tr><td class='text-left' colspan='2'>{$lang_dont_mail_unverified_mails}:</td>\n\t\t\t<td class='text-center'>{$mm}</td></tr>\n\t\t<tr><td colspan='3'>&nbsp;</td></tr>\n\t\t<tr><td><a href='listusers.php?search=yes&verified_mail=1'>{$langMailVerificationYes}</a></td>\n\t\t\t<td class='text-center'><b>" . Database::get()->querySingle("SELECT COUNT(*) AS cnt FROM user WHERE verified_mail = " . EMAIL_VERIFIED . ";")->cnt . "</b></td><td class='text-right'><input class='btn btn-primary' type='submit' name='submit1' value='{$m['edit']}'></td></tr>\n\t\t<tr><td><a href='listusers.php?search=yes&verified_mail=2'>{$langMailVerificationNo}</a></td>\n\t\t\t<td class='text-center'><b>" . Database::get()->querySingle("SELECT COUNT(*) AS cnt FROM user WHERE verified_mail = " . EMAIL_UNVERIFIED . ";")->cnt . "</b></td><td class='text-right'><input class='btn btn-primary' type='submit' name='submit2' value='{$m['edit']}'></td></tr>\n\t\t<tr><td><a href='listusers.php?search=yes&verified_mail=0'>{$langMailVerificationPending}</a></td>\n\t\t\t<td class='text-center'><b>" . Database::get()->querySingle("SELECT COUNT(*) AS cnt FROM user WHERE verified_mail = " . EMAIL_VERIFICATION_REQUIRED . ";")->cnt . "</b></td><td class='text-right'><input class='btn btn-primary' type='submit' name='submit0' value='{$m['edit']}'></td></tr>";
    if (!get_config('email_required')) {
        $tool_content .= "<tr><td><a href='listusers.php?search=yes&verified_mail=0'>{$langUsersWithNoMail}</a></td>\n                                <td class='text-center'><b>" . Database::get()->querySingle("SELECT COUNT(*) AS cnt FROM user WHERE email = '';")->cnt . "</b></td><td class='text-right'>&nbsp;</td></tr>";
    }
    $tool_content .= "<tr><td><a href='listusers.php?search=yes'>{$langTotal} {$langUsersOf}</a></td>\n\t\t\t<td class='text-center'><b>" . Database::get()->querySingle("SELECT COUNT(*) AS cnt FROM user;")->cnt . "</b></td><td class='text-right'>&nbsp;</td></tr>\n\t</table></form>";
} else {
    if (!empty($submit0)) {
        $sub = 0;
        $msg = $langMailVerificationPending;
    } elseif (!empty($submit1)) {
        $sub = 1;
        $msg = $langMailVerificationYes;
    } elseif (!empty($submit2)) {
        $sub = 2;
        $msg = $langMailVerificationNo;
    } else {
        $sub = NULL;
    }
    $c = Database::get()->querySingle("SELECT count(*) as cnt FROM user WHERE verified_mail = {$sub};")->cnt;
    if (isset($sub)) {
        $tool_content .= "<div class='form-wrapper'><form class='form-horizontal' role='form' name='mail_verification_change' method='post' action='{$_SERVER['SCRIPT_NAME']}'>\n\t\t<fieldset>\t\t\n                <div class='form-group'>\n\t\t<label class='col-sm-2 control-label'>{$langChangeTo}:</label>\n                <div class='col-sm-10'>";
        $tool_content .= selection($mail_ver_data, "new_mail_ver", $sub, "class='form-control'");
        $tool_content .= "</div>\n\t\t</div>\n\t\t<div class='col-sm-offset-2 col-sm-10'><input class='btn btn-primary' type='submit' name='submit' value='{$langEdit}'></div>\n\t\t<input type='hidden' name='old_mail_ver' value='{$sub}'>\t\t\n\t\t</fieldset>\n\t\t</form></div>";
    }
}
$tool_content .= "<div class='alert alert-warning'><b>{$langNote}</b>:<br>{$langMailVerificationNotice}</div>";
$tool_content .= "<div class='alert alert-info'>{$langMailVerificationNoticeAdmin}</div>";
draw($tool_content, 3);
Beispiel #18
0
<?php

$param = explode('=', $data[1]);
$l = selection('users', array('id' => $param[1]));
$emailfrom = $l[0]['email'];
if ($data[0] > 0) {
    $par = selection('users', array('id' => $data[0]));
}
switch ($param[0]) {
    case 'tost':
        $title = 'TO SON TOURS';
        $emailto = '*****@*****.**';
        break;
    case 'topar':
        $title = 'TO PARENT ' . $par[0]['firstname'] . ' ' . $par[0]['lastname'];
        $emailto = $par[0]['email'];
        break;
    default:
        $title = 'TO ALL PARENTS';
        $emailto = 'all';
}
?>
<div class="row part">
    <div class="col-lg-8 col-lg-offset-2">
        <div class="part-main-layout">
            <h3>SEND EMAIL <?php 
echo $title;
?>
</h3>
            <article>
                <form action="/leaders-emsent" method="post">
Beispiel #19
0
            if (count($sections)) {
                $section_id =  $sections[0]->id;
            }
        }
        $sections_array = array('' => '---');
        foreach ($sections as $sid => $section){
            $sid = $section->id;
            $qsid = q($section->public_id);
            $sections_array[$sid] = $qsid . '. ' . ellipsize($section->title, 25);
        }

        $ebook_section_select = "
                <div class='form-group'>
                    <label for='section' class='col-sm-2 control-label'>$langSection:</label>
                    <div class='col-sm-10'>
                    " . selection($sections_array, 'section_id', $section_id, 'class="form-control"') . "
                    </div>
                </div>
                ";
    } else {
        $ebook_section_select = "";
    }
    $action = defined('COMMON_DOCUMENTS')? 'commondocs': 'document';
    $tool_content .= action_bar(array(
                                array('title' => $langBack,
                                      'url' => $backUrl,
                                      'icon' => 'fa-reply',
                                      'level' => 'primary-label',
                                      'class' => 'back_btn')
                            ));
    $tool_content .= "<div class='form-wrapper'>
Beispiel #20
0
            $typeSel[0] = "selected";
            break;
        case "3":
            $typeSel[0] = "selected";
            break;
        default:
            $typeSel[-1] = "selected";
            break;
    }
}
$tool_content .= "<div class='form-group'>\n        <label for='formsearchtype' class='col-sm-2 control-label'>{$langCourseVis}:</label>\n        <div class='col-sm-10'>\n          <select class='form-control' name='formsearchtype'>\n           <option value='-1' " . @$typeSel[-1] . ">{$langAllTypes}</option>\n           <option value='2' " . @$typeSel[2] . ">{$langTypeOpen}</option>\n           <option value='1' " . @$typeSel[1] . ">{$langTypeRegistration}</option>\n           <option value='0' " . @$typeSel[0] . ">{$langTypeClosed}</option>\n           <option value='3' " . @$typeSel[3] . ">{$langCourseInactiveShort}</option>\n          </select>\n        </div>\n      </div>";
$reg_flag_data = array();
$reg_flag_data[1] = $langAfter;
$reg_flag_data[2] = $langBefore;
$tool_content .= "<div class='form-group'><label class='col-sm-2 control-label'>{$langCreationDate}:</label>";
$tool_content .= "<div class='col-sm-5'>" . selection($reg_flag_data, 'reg_flag', $reg_flag, 'class="form-control"') . "</div>";
$tool_content .= "<div class='col-sm-5'>";
$tool_content .= "<input class='form-control' id='id_date' name='date' type='text' value='{$date}' data-date-format='dd-mm-yyyy' placeholder='{$langCreationDate}'>                    \n                </div>";
$tool_content .= "</div>";
$tool_content .= "<div class='form-group'><label class='col-sm-2 control-label'>{$langFaculty}:</label>";
$tool_content .= "<div class='col-sm-10'>";
if (isDepartmentAdmin()) {
    list($js, $html) = $tree->buildNodePicker(array('params' => 'name="formsearchfaculte"', 'tree' => array('0' => $langAllFacultes), 'useKey' => "id", 'multiple' => false, 'allowables' => $user->getDepartmentIds($uid)));
} else {
    list($js, $html) = $tree->buildNodePicker(array('params' => 'name="formsearchfaculte"', 'tree' => array('0' => $langAllFacultes), 'useKey' => "id", 'multiple' => false));
}
$head_content .= $js;
$tool_content .= $html;
$tool_content .= "</div></div>";
$tool_content .= "<div class='form-group'>\n                    <div class='col-sm-10 col-sm-offset-2'>\n                        <input class='btn btn-primary' type='submit' name='search_submit' value='{$langSearch}'>\n                        <a href='index.php' class='btn btn-default'>{$langCancel}</a>        \n                    </div>\n      </div>";
$tool_content .= "</fieldset></form></div>";
Beispiel #21
0
                         <td class='center' style='width: 50px;'>
                             <input type='hidden' name='oldssid[$file_id]' value='$r->ssid'>
                             <input type='text' class='form-control' name='ssid[$file_id]' value='" . q($r->pssid) . "'>
                         </td>
                     </tr>";
                unset($files[$id_map[$file_id]]);        
            }
            foreach ($files as $key => $file) {        
                $path = $paths[$key];
                $file_id = $file_ids[$key];
                $title = get_html_title($basedir . $path);
                $tool_content .= "
                 <tr class='not_visible'>          
                     <td class='smaller'><a href='show.php/$course_code/$ebook_id/_" . q($file) . "' target='_blank'>" . q($file) . "</a></td>
                     <td><input type='text' name='title[$file_id]' size='30' value='" . q($title) . "' /></td>
                     <td>" . selection($sections, "sid[$file_id]", ' ', 'class="form-control"') . "</td>
                     <td class='center' style='width: 50px;'>
                        <input class='form-control' type='text' name='ssid[$file_id]'>
                    </td>
                 </tr>";        
            }
            $tool_content .= "
             <tr>
               <td colspan='3'>&nbsp;</td>
               <td><input class='btn btn-primary' type='submit' name='submit' value='$langSubmit'></td>
             </table>
         </fieldset>
      </form>";
 } else {
     $tool_content .= "<div class='alert alert-warning'>$langEBookNoPages</div>";
 }
Beispiel #22
0
         $oldTitle = q($row->title);
         $oldCreator = q($row->creator);
         $oldDate = q($row->date);
         $oldSubject = q($row->subject);
         $oldDescription = q($row->description);
         $oldAuthor = q($row->author);
         $oldLanguage = q($row->language);
         $oldCopyrighted = $row->copyrighted;
         // filsystem compability: ean gia to arxeio den yparxoun dedomena sto pedio filename
         // (ara to arxeio den exei safe_filename (=alfarithmitiko onoma)) xrhsimopoihse to
         // $fileName gia thn provolh tou onomatos arxeiou
         $fileName = my_basename($comment);
         if (empty($oldFilename)) {
             $oldFilename = $fileName;
         }
         $dialogBox .= "<div class='form-wrapper'>\n                        <form class='form-horizontal' role='form' method='post' action='{$_SERVER['SCRIPT_NAME']}?course={$course_code}'>\n                        <fieldset>\n                          <input type='hidden' name='commentPath' value='" . q($comment) . "' />\n                          <input type='hidden' size='80' name='file_filename' value='{$oldFilename}' />\n                          {$group_hidden_input}\n                          <div class='form-group'>\n                          <label class='col-sm-2 control-label'>{$langWorkFile}:</label>\n                              <span>{$oldFilename}</span>\n                          </div>\n                          <div class='form-group'>\n                            <label class='col-sm-2 control-label'>{$langTitle}:</label>\n                            <div class='col-sm-10'><input class='form-control' type='text' name='file_title' value='{$oldTitle}'></div>\n                          </div>\n                          <div class='form-group'>\n                            <label class='col-sm-2 control-label'>{$langComment}:</label>\n                            <div class='col-sm-10'><input class='form-control' type='text' name='file_comment' value='{$oldComment}'></div>\n                          </div>\n                          <div class='form-group'>\n                            <label class='col-sm-2 control-label'>{$langCategory}:</label>\n                            <div class='col-sm-10'>" . selection(array('0' => $langCategoryOther, '1' => $langCategoryExcercise, '2' => $langCategoryLecture, '3' => $langCategoryEssay, '4' => $langCategoryDescription, '5' => $langCategoryExample, '6' => $langCategoryTheory), 'file_category', $oldCategory, "class='form-control'") . "</div>\n                          </div>\n                          <div class='form-group'>\n                            <label class='col-sm-2 control-label'>{$langSubject}:</label>\n                            <div class='col-sm-10'><input class='form-control' type='text' name='file_subject' value='{$oldSubject}'></div>\n                          </div>\n                          <div class='form-group'>\n                            <label class='col-sm-2 control-label'>{$langDescription}:</label>\n                            <div class='col-sm-10'><input class='form-control' type='text' name='file_description' value='{$oldDescription}'></div>\n                          </div>\n                          <div class='form-group'>\n                            <label class='col-sm-2 control-label'>{$langAuthor}:</label>\n                            <div class='col-sm-10'><input class='form-control' type='text' name='file_author' value='{$oldAuthor}'></div>\n                          </div>\n                        <div class='form-group'>\n                            <label class='col-sm-2 control-label'>{$langCopyrighted}:</label>\n                            <div class='col-sm-10'>" . selection($copyright_titles, 'file_copyrighted', $oldCopyrighted, "class='form-control'") . "</div>\n                        </div>\n                        <div class='form-group'>\n                                <label class='col-sm-2 control-label'>{$langLanguage}:</label>\n                                <div class='col-sm-10'>" . selection(array('en' => $langEnglish, 'fr' => $langFrench, 'de' => $langGerman, 'el' => $langGreek, 'it' => $langItalian, 'es' => $langSpanish), 'file_language', $oldLanguage, "class='form-control'") . "</div>\n                        </div>\n                        <div class='form-group'>\n                            <div class='col-sm-offset-2 col-sm-10'>\n                                <input class='btn btn-primary' type='submit' value='{$langOkComment}'>\n                            </div>\n                        </div>\n                        <span class='help-block'>{$langNotRequired}</span>                       \n                        <input type='hidden' size='80' name='file_creator' value='{$oldCreator}'>\n                        <input type='hidden' size='80' name='file_date' value='{$oldDate}'>\n                        <input type='hidden' size='80' name='file_oldLanguage' value='{$oldLanguage}'>\n                        </fieldset>\n                        </form></div>";
     } else {
         $action_message = "<div class='alert alert-danger'>{$langFileNotFound}</div>";
     }
 }
 // Emfanish ths formas gia tropopoihsh metadata
 if (isset($_GET['metadata'])) {
     $metadata = $_GET['metadata'];
     $row = Database::get()->querySingle("SELECT filename FROM document WHERE {$group_sql} AND path = ?s", $metadata);
     if ($row) {
         $oldFilename = q($row->filename);
         // filesystem compability: ean gia to arxeio den yparxoun dedomena sto pedio filename
         // (ara to arxeio den exei safe_filename (=alfarithmitiko onoma)) xrhsimopoihse to
         // $fileName gia thn provolh tou onomatos arxeiou
         $fileName = my_basename($metadata);
         if (empty($oldFilename)) {
Beispiel #23
0
<div class="col-lg-12 owl-carousel fsld-layer" id="featured-owl">
<?php 
foreach ($data as $p) {
    $sl = selection('slike', array('sli_proizvod_id' => $p['pro_id']));
    ?>
<div class="with-owl">   
        <div class="featured-layer">
            <a href="/proizvod/<?php 
    echo $p['pro_slug'];
    ?>
" class="single" data-pid="<?php 
    echo $p['pro_id'];
    ?>
">
            <div class="featured-image">
                <div class="featured-price">
                    <strong><?php 
    echo $p['pro_cena'];
    ?>
 RSD</strong>
                </div>
                <img src="/assets/images/products/<?php 
    echo $sl[0]['sli_url'];
    ?>
" alt="Slika proizvoda" class="img-responsive" />
            </div>
            <div class="featured-title">
                <p><?php 
    echo $p['pro_naziv'];
    ?>
</p>
Beispiel #24
0
function show_submission_form($id, $user_group_info, $on_behalf_of=false, $submissions_exist=false) {
    global $tool_content, $m, $langWorkFile, $langSendFile, $langSave, $langSubmit, $uid,
    $langNotice3, $gid, $urlAppend, $langGroupSpaceLink, $langOnBehalfOf,
    $course_code, $course_id, $langBack, $is_editor, $langCancel, $langWorkOnlineText,
    $langGradeScalesSelect;

    $assignment = Database::get()->querySingle("SELECT * FROM assignment WHERE id = ?d", $id);

    $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 = "
                        <div class='form-group'>
                            <label for='group_id' class='col-sm-2 control-label'>$langGroupSpaceLink:</label>
                            <div class='col-sm-10'>
                              " . selection($user_group_info, 'group_id') . "
                            </div>
                        </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) .
                        "</div>\n";
            }
        } else {
            $groups_with_no_submissions = groups_with_no_submissions($id);
            if (count($groups_with_no_submissions)>0) {
                $group_select_form = "
                        <div class='form-group'>
                            <label for='group_id' class='col-sm-2 control-label'>$langGroupSpaceLink:</label>
                            <div class='col-sm-10'>
                              " . selection($groups_with_no_submissions, 'group_id') . "
                            </div>
                        </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 = "
                        <div class='form-group'>
                            <label for='user_id' class='col-sm-2 control-label'>$langOnBehalfOf:</label>
                            <div class='col-sm-10'>
                              " .selection($users_with_no_submissions, 'user_id', '', "class='form-control'") . "
                            </div>
                        </div>";
            } else {
                Session::Messages($m['NoneWorkUserNoSubmission'], 'alert-danger');
                redirect_to_home_page('modules/work/index.php?course='.$course_code.'&id='.$id);
            }
    }
    $notice = ($submissions_exist)?
    "<div class='alert alert-info'>" . icon('fa-info-circle') . " $langNotice3</div>": '';
    if ($assignment->grading_scale_id) {
        $serialized_scale_data = Database::get()->querySingle('SELECT scales FROM grading_scale WHERE id = ?d AND course_id = ?d', $assignment->grading_scale_id, $course_id)->scales;
        $scales = unserialize($serialized_scale_data);
        $scale_options = "<option value> - </option>";
        foreach ($scales as $scale) {
            $scale_options .= "<option value='$scale[scale_item_value]'>$scale[scale_item_name]</option>";
        }
        $grade_field = "
                <select name='grade' class='form-control' id='scales'>
                    $scale_options
                </select>";
    } else {
        $grade_field = "<input class='form-control' type='text' name='grade' maxlength='4' size='3'> ($m[max_grade]: $assignment->max_grade)";
    }
    $extra = $on_behalf_of ? "
                        <div class='form-group'>
                            <label class='col-sm-2 control-label'>$m[grade]:</label>
                            <div class='col-sm-10'>
                              $grade_field
                              <input type='hidden' name='on_behalf_of' value='1'>
                            </div>
                        </div>
                        <div class='form-group'>
                            <div class='col-sm-10 col-sm-offset-2'>
                                <div class='checkbox'>
                                  <label>
                                    <input type='checkbox' name='email' id='email_button' value='1'>
                                    $m[email_users]
                                  </label>
                                </div>
                            </div>
                        </div>" : '';
    if (!$is_group_assignment || count($user_group_info) || $on_behalf_of) {
        if($assignment->submission_type){
            $submission_form = "
                        <div class='form-group'>
                            <label for='submission_text' class='col-sm-2 control-label'>$langWorkOnlineText:</label>
                            <div class='col-sm-10'>
                                ". rich_text_editor('submission_text', 10, 20, '') ."
                            </div>
                        </div>";
        } else {
            $submission_form = "
                        <div class='form-group'>
                            <label for='userfile' class='col-sm-2 control-label'>$langWorkFile:</label>
                            <div class='col-sm-10'>
                              <input type='file'  name='userfile' id='userfile'>
                            </div>
                        </div>";
        }
        $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
                )
            ))."
                    $notice
                    <div class='form-wrapper'>
                     <form class='form-horizontal' role='form' enctype='multipart/form-data' action='$_SERVER[SCRIPT_NAME]?course=$course_code' method='post'>
                        <input type='hidden' name='id' value='$id' />$group_select_hidden_input
                        <fieldset>
                        $group_select_form
                        $submission_form
                        <div class='form-group'>
                            <label for='stud_comments' class='col-sm-2 control-label'>$m[comments]:</label>
                            <div class='col-sm-10'>
                              <textarea class='form-control' name='stud_comments' id='stud_comments' rows='5'></textarea>
                            </div>
                        </div>
                        $extra
                        <div class='form-group'>
                            <div class='col-sm-10 col-sm-offset-2'>".
                    form_buttons(array(
                        array(
                            'text'          => $langSave,
                            'name'          => 'work_submit',
                            'value'         => $langSubmit
                        ),
                        array(
                            'href' => $back_link
                        )
                    ))
                    ."</div>
                        </div>
                        </fieldset>
                     </form>
                     </div>
                     <div class='pull-right'><small>$GLOBALS[langMaxFileSize] " .
                ini_get('upload_max_filesize') . "</small></div><br>";
    }
}
Beispiel #25
0
                                $loclangname
                            </label>
                        </div>";

            }
        }
$tool_content .= "<div class='panel panel-default' id='three'>
                <div class='panel-heading'>
                    <h2 class='panel-title'>$langEclassThemes</h2>
                </div>
                <div class='panel-body'>
                    <fieldset>
                        <div class='form-group'>
                           <label for='default_language' class='col-sm-3 control-label'>$langMainLang: </label>
                           <div class='col-sm-9'>" .
                               selection($selectable_langs, 'default_language', get_config('default_language'),
                                         "class='form-control' id='default_language'") .
                           "</div>
                        </div>
                        <div class='form-group'>
                            <label class='col-sm-3 control-label'>$langSupportedLanguages:</label>
                            <div class='col-sm-9'>
                            " . implode(' ', $sel) . "
                            </div>
                        </div>
                        <div class='form-group'>
                           <label for='theme' class='col-sm-3 control-label'>$lang_login_form: </label>
                           <div class='col-sm-9'>
                                <div class='checkbox'>
                                    <label>
                                        <input id='hide_login_check' type='checkbox' name='dont_display_login_form' value='1' $cbox_dont_display_login_form>
                                        $lang_dont_display_login_form
Beispiel #26
0
    }    
    @$tool_content .= "
    <div class='form-wrapper'>
        <div class='row margin-bottom-fat'>
            <div class='col-sm-3 text-right'>
                <strong>$langActiveTheme:</strong>
            </div>
            <div class='col-sm-9'>
            ".$themes_arr[$active_theme]."
            </div>
        </div>
        <form class='form-horizontal' role='form' action='$_SERVER[SCRIPT_NAME]' method='post' id='theme_selection'>
            <div class='form-group'>
                <label for='bgColor' class='col-sm-3 control-label'>$langAvailableThemes:</label>
                <div class='col-sm-9'>
                    ".  selection($themes_arr, 'active_theme_options', $theme_id, 'class="form-control form-submit" id="theme_selection"')."
                </div>
            </div>
        </form>
        <div class='form-group margin-bottom-fat'>
            <div class='col-sm-9 col-sm-offset-3'>
                $activate_btn
                $preview_btn  
                $delete_btn
            </div>
        </div>
    </div>";
$tool_content .= "     
<div role='tabpanel'>

  <!-- Nav tabs -->
Beispiel #27
0
           <label>
             <input type='radio' name='l_radio' value='10'>
             {$license[10]['title']}
           </label>
         </div>
         <div class='radio'>
           <label>
             <input id='cc_license' type='radio' name='l_radio' value='cc'>
             $langCMeta[course_license]
           </label>
         </div>                         
     </div>
 </div>
 <div class='form-group' id='cc'>
     <div class='col-sm-10 col-sm-offset-2'>
           " . selection($cc_license, 'cc_use', "",'class="form-control"') . "
     </div>              
 </div>
 <div class='form-group'>
     <label for='localize' class='col-sm-2 control-label'>$langAvailableTypes:</label>
     <div class='col-sm-10'>
         <div class='radio'>
           <label>
             <input id='courseopen' type='radio' name='formvisible' value='2' checked>
             <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'>
Beispiel #28
0
         " . selection($authtype_data, 'auth_type', 0, 'class="form-control"') . "
     </div>
 </div>
 <div class='form-group'>
     <label class='col-sm-2 control-label'>$langRegistrationDate:</label>
     <div class='col-sm-5'>
         " . selection(array('1' => $langAfter, '2' => $langBefore), 'reg_flag', $reg_flag, 'class="form-control"') . "
     </div>
     <div class='col-sm-5'>       
         <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'>
     </div>   
 </div>
 <div class='form-group'>
     <label class='col-sm-2 control-label'>$langEmailVerified:</label>
     <div class='col-sm-10'>
         " . selection($verified_mail_data, 'verified_mail', $verified_mail, 'class="form-control"') . "
     </div>
 </div>
 <div class='form-group'>
     <label for='dialog-set-value' class='col-sm-2 control-label'>$langFaculty:</label>
     <div class='col-sm-10'>
         $html
     </div>
 </div>
 <div class='form-group'>
     <label for='search_type' class='col-sm-2 control-label'>$langSearchFor:</label>
     <div class='col-sm-10'>
         <select class='form-control' name='search_type' id='search_type'>
           <option value='exact'>$langSearchExact</option>
           <option value='begin'>$langSearchStartsWith</option>
           <option value='contains' selected>$langSearchSubstring</option>
Beispiel #29
0
    if (isset($_GET['add_selection'])) {
        global $con;
        $ip = getIp();
        $worker_id = $_GET['add_selection'];
        $check_pro = " select * from selections where ip_add ='{$ip}' AND w_id ='{$worker_id}' ";
        $run_check = mysqli_query($con, $check_pro);
        if (mysqli_num_rows($run_check) > 0) {
            echo "";
        } else {
            $insert_pro = " insert into selections  (w_id,ip_add) values ('{$worker_id}' , '{$ip}')";
            $run_pro = mysqli_query($con, $insert_pro);
            echo "<script>window.open('index.php','_self')</script>";
        }
    }
}
selection();
// getting the total items
function total_selections()
{
    if (isset($_GET['add_selection'])) {
        global $con;
        $ip = getIp();
        $get_items = "select  *  from selections where ip_add='{$ip}' ";
        $run_items = mysqli_query($con, $get_items);
        $count_items = mysqli_num_rows($run_items);
    } else {
        global $con;
        $ip = getIp();
        $get_items = "select  *  from selections where ip_add='{$ip}' ";
        $run_items = mysqli_query($con, $get_items);
        $count_items = mysqli_num_rows($run_items);
Beispiel #30
0
    }
    $tool_content .= "\n      </table>\n      </fieldset>";
    // Form #3 - edit subsection file assignment
    $tool_content .= "\n     <fieldset>\n     <h4>{$langEBookMenuTitle}</h4>\n     <table width='100%' class='table-default'>\n     <tr>       \n       <th>{$langFileName}</th>\n       <th>{$langTitle}</th>\n       <th>{$langSection}</th>\n       <th>{$langSubsection}</th>\n     </tr>";
    $q = Database::get()->queryArray("SELECT ebook_section.id AS sid,\n                              ebook_section.id AS psid,\n                              ebook_section.title AS section_title,\n                              ebook_subsection.id AS ssid,\n                              ebook_subsection.public_id AS pssid,\n                              ebook_subsection.title AS subsection_title,\n                              ebook_subsection.file_id as file_id\n                       FROM ebook_section, ebook_subsection\n                       WHERE ebook_section.ebook_id = {$info->id} AND\n                             ebook_section.id = ebook_subsection.section_id\n                             ORDER BY CONVERT(psid, UNSIGNED), psid,\n                                      CONVERT(pssid, UNSIGNED), pssid");
    foreach ($q as $r) {
        $file_id = $r->file_id;
        $display_id = $r->sid . ',' . $r->ssid;
        $tool_content .= "\n            <tr>              \n              <td class='smaller'><a href='show.php/{$course_code}/{$ebook_id}/{$display_id}/' target='_blank'>" . q($files[$id_map[$file_id]]) . "</a></td>\n              <td><input type='text' name='title[{$file_id}]' size='30' value='" . q($r->subsection_title) . "'></td>\n              <td>" . selection($sections, "sid[{$file_id}]", $r->sid, 'class="form-control"') . "</td>\n              <td class='center'><input type='hidden' name='oldssid[{$file_id}]' value='{$r->ssid}'>\n                  <input type='text' name='ssid[{$file_id}]' size='3' value='" . q($r->pssid) . "'></td>\n            </tr>";
        unset($files[$id_map[$file_id]]);
    }
    foreach ($files as $key => $file) {
        $path = $paths[$key];
        $file_id = $file_ids[$key];
        $title = get_html_title($basedir . $path);
        $tool_content .= "\n        <tr>          \n          <td class='smaller'><a href='show.php/{$course_code}/{$ebook_id}/_" . q($file) . "' target='_blank'>" . q($file) . "</a></td>\n          <td><input type='text' name='title[{$file_id}]' size='30' value='" . q($title) . "' /></td>\n          <td>" . selection($sections, "sid[{$file_id}]", ' ', 'class="form-control"') . "</td>\n          <td class='center'><input type='text' name='ssid[{$file_id}]' size='3' /></td>\n        </tr>";
    }
    $tool_content .= "\n     <tr>\n       <td colspan='3'>&nbsp;</td>\n       <td><input class='btn btn-primary' type='submit' name='submit' value='{$langSubmit}'></td>\n     </table>\n     </fieldset>\n     </form>";
}
draw($tool_content, 2, null, $head_content);
function find_html_files()
{
    global $group_sql;
    $disk_paths = array();
    $public_paths = array();
    $file_ids = array();
    $q = Database::get()->queryArray("SELECT id, path, filename FROM document\n                              WHERE {$group_sql} AND (format = 'html' OR format = 'htm')");
    foreach ($q as $row) {
        $disk_paths[] = $row->path;
        $public_paths[] = public_file_path($row->path, $row->filename);
        $file_ids[] = $row->id;