function getModuleInfo($name) { $arrModules = getModules(); foreach ($arrModules as $arrModule) { if ($arrModule['name'] == $name) { return $arrModule; } } return false; }
function showModulesDropDown($module = "") { $table = getModules(); div_open(); form_start_post(); form_select("module"); if ($table) { while ($row = nextResultInTable($table)) { if ($module == $row['module']) { form_option($row['module'], $row['module'], "true"); } else { form_option($row['module'], $row['module']); } } } else { // no modules with settings available form_option("-", ""); } form_select_end(); // this module form_hidden("m_c", "showSettingsGUI"); // button form_submit("submit", getString("settings_show_settings", "Vis innstillinger")); form_end(); div_close(); }
public function &render($hookFunction=false) { //$data_item_type_id=100; $arrModule=getModules(); $arrRender=array(); foreach($arrModule as $data_item_type_id=>$moduleData) { $arrFieldRecord=getModuleFields($data_item_type_id,true); $arrRenderSerialize=array(); /** * build sequence array */ $arrFieldSeq=array(); foreach($arrFieldRecord as $ind=>$fieldData) { $sequence=isset($fieldData["sequence"])?$fieldData["sequence"]:0; $arrFieldSeq[$sequence][]=$fieldData; } ksort($arrFieldSeq, SORT_NUMERIC);//trace($arrFieldSeq,2); //trace($arrFieldSeq); foreach($arrFieldSeq as $sequence=>$arrField) { foreach($arrField as $ind=>$fieldData) { //if($fieldData["displaytype"]<=0) continue; $fieldName=$fieldData["fieldname"]; /** * process hook */ $caption=getLangVar($fieldName); $arrRenderSerialize[]=empty($caption)?$fieldName:$caption; /** * check whether calculated field or database field */ ///if it is database field if(isset($fieldData["id"])) { if($fieldData["displaytype"]<=0) { $arrRenderSerialize[]="<input type='checkbox' name='field_hide[{$fieldData["id"]}]' onclick='javascript:updateField(\"{$moduleData["module"]}\",\"{$fieldName}\",this);' />"; } else { $arrRenderSerialize[]="<input type='checkbox' checked name='field_hide[{$fieldData["id"]}]' onclick='javascript:updateField(\"{$moduleData["module"]}\",\"{$fieldName}\",this);' />"; } if($fieldData["readonly"]<=0) { $arrRenderSerialize[]="<input type='checkbox' name='field_readonly[{$fieldData["id"]}]' onclick='javascript:updateFieldReadonly(\"{$moduleData["module"]}\",\"{$fieldName}\",this);' />"; } else { $arrRenderSerialize[]="<input type='checkbox' checked name='field_readonly[{$fieldData["id"]}]' onclick='javascript:updateFieldReadonly(\"{$moduleData["module"]}\",\"{$fieldName}\",this);' />"; } $arrRenderSerialize[]="<a href='index.php?m=settings&modulename={$moduleData["module"]}&a=moveUp&field_id={$fieldData["id"]}'>Up</a>"; $arrRenderSerialize[]="<a href='index.php?m=settings&modulename={$moduleData["module"]}&a=moveDown&field_id={$fieldData["id"]}'>Down</a>"; if($fieldData["is_extra"]>0) { $arrRenderSerialize[]="<a href='index.php?m=settings&modulename={$moduleData["module"]}&a=delete&field_id={$fieldData["id"]}'>Delete</a>"; } else { $arrRenderSerialize[]="-"; } } else { if(!isset($fieldData["displaytype"]) || $fieldData["displaytype"]<=0) { $arrRenderSerialize[]="<input type='checkbox' disabled />"; } else { $arrRenderSerialize[]="<input type='checkbox' checked disabled />"; } if(!isset($fieldData["readyonly"]) || $fieldData["readyonly"]<=0) { $arrRenderSerialize[]="<input type='checkbox' disabled />"; } else { $arrRenderSerialize[]="<input type='checkbox' checked disabled />"; } $arrRenderSerialize[]="<input type='button' value='up' disabled />"; $arrRenderSerialize[]="<input type='button' value='down' disabled />"; $arrRenderSerialize[]="<input type='button' value='delete' disabled />"; } } } $columnPrefix="col"; $arrRenderView = multi_dimension_array($arrRenderSerialize, 6, $columnPrefix); $arrRender[$data_item_type_id]=$arrRenderView; } return $arrRender; }
//register Qool $loader->registerNamespace('Qool_'); //register the Templates $loader->registerNamespace('Templates_'); //get the controller object $frontend = Zend_Controller_Front::getInstance(); $frontend->setParam('noViewRenderer', true); $frontend->setParam('noErrorHandler', false); //lets route for the system routes $router = $frontend->getRouter(); $router->addConfig($routes); //lets add the controllers $frontend->setControllerDirectory(array('default' => APPL_PATH . $dirs['structure']['controllers'] . DIR_SEP . 'frontend', 'admin' => APPL_PATH . $dirs['structure']['controllers'] . DIR_SEP . 'backend')); //read the addons file $controllers = getControllers($dirs, $addons); $modules = getModules($dirs, $modules); $widgets = getWidgets($dirs, $widgets); //now register the controllers for these addons foreach ($controllers as $k => $v) { $frontend->addControllerDirectory(APPL_PATH . $v, $k); } //also add the routes foreach addon foreach ($controllers as $k => $v) { $addonRoutes = new Zend_Config_Xml(APPL_PATH . $dirs['structure']['addons'] . DIR_SEP . $k . DIR_SEP . 'routes.xml'); $router->addConfig($addonRoutes); } //also add the routes for the admin backend $router->addConfig(new Zend_Config_Xml(APPL_PATH . $dirs['structure']['controllers'] . DIR_SEP . 'backend' . DIR_SEP . 'routes.xml')); //attach the router to the frontend $frontend->setRouter($router); //we will be setting some registry values here
// If no student number try the other details. $first_names = trim($temp_first_names) . '%'; $temp_surname = trim($temp_surname); $temp_title = trim($temp_title); $result = $mysqli->prepare("SELECT id, surname, first_names, title, gender, student_id FROM users LEFT JOIN sid ON users.id = sid.userID WHERE surname=? AND first_names LIKE ? AND (roles LIKE '%staff%' OR roles = 'student')"); $result->bind_param('ss', $temp_surname, $first_names); $result->execute(); $result->store_result(); $result->bind_result($target_userID, $target_surname, $target_first_names, $target_title, $gender, $student_id); while ($result->fetch()) { $target_student[$target_userID]['surname'] = $target_surname; $target_student[$target_userID]['first_names'] = $target_first_names; $target_student[$target_userID]['title'] = $target_title; $target_student[$target_userID]['gender'] = $gender; $target_student[$target_userID]['student_id'] = $student_id; $target_student[$target_userID]['modules'] = getModules($target_userID, $mysqli); } $result->close(); } echo "<p>" . str_replace('user', 'Temporary Account ', $temp_username) . " " . $string['msg3'] . ":</p>\n<form method=\"post\" action=\"" . $_SERVER['PHP_SELF'] . "?userID={$userID}&paperID={$paperID}\">\n<table border=\"0\" style=\"width:100%\">\n"; echo "<tr><th>" . $string['Title'] . "</th><th>" . $string['Last Name'] . "</th><th>" . $string['First Names'] . "</th><th>" . $string['Student ID'] . "</th><th></th></tr>\n"; echo "<tr><td><input type=\"text\" name=\"title\" value=\"{$temp_title}\" size=\"5\" /></td><td><input type=\"text\" name=\"surname\" value=\"{$temp_surname}\" size=\"15\" /></td><td><input type=\"text\" name=\"first_names\" value=\"{$temp_first_names}\" size=\"15\" /></td><td><input type=\"text\" name=\"student_id\" value=\"{$temp_student_id}\" size=\"6\" /></td><td><input type=\"submit\" name=\"submit\" value=\"" . $string['search'] . "\" style=\"width:80px\" /></tr>\n"; echo "</table>\n</form>\n"; if (count($target_student) == 0) { echo "<div>" . $string['msg4'] . ".</div>\n"; } else { echo "<br /><div>" . $string['Reassign answers'] . " " . str_replace('user', 'Temporary Account ', $temp_username) . " " . $string['to following user'] . ":</div>\n<div id=\"userlist\" style=\"height:300px; border:1px solid #7F9DB9; overflow-y:scroll\">\n"; foreach ($target_student as $individualID => $individual) { if ($individual['title'] == 'Mr') { $user_icon = 'user_male_48.png'; } elseif ($individual['title'] == 'Dr') {
<?php define('IN_GW', true); load()->web('right'); $Modules = getModules();
if (0 !== strpos($new_folder, '.')) { $new_new_path = $new_path . '/' . $new_folder; if (isModule($new_new_path)) { $item = readPackage($new_new_path); $category = $item['category']; array_push($items, $item); } } } } return array('items' => $items, 'category' => $category); } $list = scandir($base_dir); foreach ($list as $folder) { if (0 !== strpos($folder, '.')) { $data = getModules($base_dir . '/' . $folder); $category = $data['category']; $modules = $data['items']; if (!empty($modules)) { if (empty($output[$category])) { $output[$category] = array(); } $output[$category] = array_merge($output[$category], $modules); } } } //write cache $cache = array('time' => date('Y-m-d H:i:s'), 'checksum' => $checkSum, 'data' => $output); $content = "<?php\nreturn " . var_export($cache, true) . ';'; @file_put_contents($cacheFn, $content); echo ' ' . json_encode($output);
if (isset($_REQUEST['modul']) && $_REQUEST['modul'] != '' && $_REQUEST['modul'] != 'engine') { $module = $_REQUEST['modul']; if ($_REQUEST['aktion'] == 'installModule' && $module != '') { installModule($module); } elseif ($_REQUEST['aktion'] == 'uninstallModule' && $module != '') { uninstallModule($module); } } if (isset($_REQUEST['aktion']) && $_REQUEST['aktion'] == 'updateEngine') { updateEngine(); } $libCronjobs->executeJobs(); echo 'Lade Paketinformationen aus dem Repository.'; echo '</div>'; $manifestUrl = 'http://' . $repoHostname . '/manifest.json?id=' . $libGlobal->getSiteUrlAuthority() . '&version=' . $libGlobal->version; $modules = getModules($manifestUrl); /* * output */ echo $libString->getErrorBoxText(); echo $libString->getNotificationBoxText(); echo '<p>Das VCMS besteht aus einer Engine und mehreren Modulen, die auf dieser Seite aktualisiert werden können. Die folgende Liste zeigt die im System installierten sowie die im Repository verfügbaren Versionen.</p>'; echo '<table class="table table-condensed table-striped table-hover">'; echo '<thead>'; echo '<tr>'; echo '<th>Modulname</th><th>Status</th>'; echo '<th>Version<br />(installiert)</th>'; echo '<th>Version<br />(Repository)</th>'; echo '<th class="toolColumn"></th>'; echo '<th class="toolColumn"></th>'; echo '<th class="toolColumn"></th>';