public static function Template() { $user = ctrl_users::GetUserDetail(); if (!fs_director::CheckForEmptyValue(fs_director::CheckForEmptyValue($user['usercss']))) { $retval = "etc/styles/" . ui_template::GetUserTemplate() . "/css/default.css"; } else { $retval = "etc/styles/" . ui_template::GetUserTemplate() . "/css/" . $user['usercss'] . ".css"; } return $retval; }
/** * Provides module icon functionality. * @global type $controller * @return type */ public static function getModuleIcon() { global $controller; $mod_dir = $controller->GetControllerRequest('URL', 'module'); // Check if the current userland theme has a module icon override if (file_exists('etc/styles/' . ui_template::GetUserTemplate() . '/images/' . $mod_dir . '/assets/icon.png')) { return './etc/styles/' . ui_template::GetUserTemplate() . '/images/' . $mod_dir . '/assets/icon.png'; } return './modules/' . $mod_dir . '/assets/icon.png'; }
public static function Template() { global $controller; if (!$controller->GetControllerRequest('URL', 'module')) { $line = ''; $modcats = ui_moduleloader::GetModuleCats(); $mod_box_count = 0; $line .= '<ul id="sortable-with-handles" class="sortable grid ">'; foreach ($modcats as $modcat) { $mods = ui_moduleloader::GetModuleList($modcat['mc_id_pk'], "modadmin"); if ($mods) { $catUrl = strtolower(str_replace(' ', '-', $modcat['mc_name_vc'])); $line .= '<li data-catid="' . $modcat['mc_id_pk'] . '" id="' . $catUrl . '" class="col-span-6 module-box">'; $line .= ' <div class="module-box-title">'; $line .= ' <h4><: ' . $modcat['mc_name_vc'] . ' :></h4>'; $line .= ' <div class="tools">'; $line .= ' <span class="collapse"><i class="icon-up-open"></i></span> <span class="handle"></span>'; $line .= ' </div>'; $line .= ' </div>'; $line .= ' <div class="module-box-body" style="display: block;">'; $line .= ' <ul>'; foreach ($mods as $mod) { $translatename = $mod['mo_name_vc']; $cleanname = str_replace(" ", "ZP(br)", $translatename); // Check is User Style Module Icon Exist if (file_exists('etc/styles/' . ui_template::GetUserTemplate() . '/img/modules/' . $mod['mo_folder_vc'] . '/assets/icon.png')) { $icon = 'etc/styles/' . ui_template::GetUserTemplate() . '/img/modules/' . $mod['mo_folder_vc'] . '/assets/icon.png'; } else { $icon = 'modules/' . $mod['mo_folder_vc'] . '/assets/icon.png'; } $line .= ' <li>'; $line .= ' <a href="?module=' . $mod['mo_folder_vc'] . '" title="<: ' . $mod['mo_desc_tx'] . ' :>">'; $line .= '<img src="' . $icon . '" border="0">'; $line .= ' </a>'; $line .= ' <br />'; $line .= ' <a href="?module=' . $mod['mo_folder_vc'] . '"><: ' . $cleanname . ' :></a>'; $line .= ' </li>'; } $line .= ' </ul>'; $line .= ' </div><!-- end module-box-body-->'; $line .= '</li><!-- end module-box-->'; // Clear our Floated Divs every 2 boxes $mod_box_count++; if ($mod_box_count % 2 == 0) { $css_class = ''; } else { $css_class = 'last'; } } } $line .= '</ul>'; //end sortable; return $line; } }
$sql->bindParam(':username', $_POST['inUsername']); $sql->execute(); $result = $sql->fetch(); $crypto = new runtime_hash(); $crypto->SetPassword($_POST['inPassword']); $crypto->SetSalt($result['ac_passsalt_vc']); $secure_password = $crypto->CryptParts($crypto->Crypt())->Hash; if (!ctrl_auth::Authenticate($_POST['inUsername'], $secure_password, $rememberdetails, false, $inSessionSecuirty)) { header("location: ./?invalidlogin"); exit; } } if (isset($_COOKIE['zUser'])) { if (isset($_COOKIE['zSec'])) { if ($_COOKIE['zSec'] == false) { $secure = false; } else { $secure = true; } } else { $secure = true; } ctrl_auth::Authenticate($_COOKIE['zUser'], $_COOKIE['zPass'], false, true, $secure); } if (!isset($_SESSION['zpuid'])) { ctrl_auth::RequireUser(); } runtime_hook::Execute('OnBeforeControllerInit'); $controller->Init(); ui_templateparser::Generate("etc/styles/" . ui_template::GetUserTemplate());
public function getHTML() { $mp = $this->manifest_path != null ? $this->manifest_path : REASG_SELF_DIRECTORY . 'manifest.js'; if (file_exists($mp)) { $this->loadManifest($mp); } $payload = ['view_name' => $this->name, 'location' => REASG_SELF_LOCATION, 'scope' => REASG_SELF_SCOPE, 'controller' => REASG_SELF_CONTROLLER, 'controller_class' => REASG_SELF_CONTROLLER_CLASS, 'root_url' => REASG_ROOT_URL, 'base_url' => REASG_ROOT_URL . 'app/' . REASG_SELF_LOCATION . '/' . REASG_SELF_SCOPE . '/', 'url' => REASG_ROOT_URL . 'app/' . REASG_SELF_LOCATION . '/' . REASG_SELF_SCOPE . '/' . REASG_SELF_CONTROLLER . '/', 'action' => REASG_SELF_CONTROLLER_ACTION]; $js = "\n\nclient_interactions.backend = " . json_encode($payload) . ";\n"; $this->js_init->write($js); $s = "<script type='text/javascript' name='J2'>\n"; if (!empty($this->data)) { //$s.= "rea_views.setViewDataFromJSON(\"{$this->name}\", " . json_encode($this->data ) . ");\n"; } $s .= "</script>"; $this->body->write($s); $html = parent::getHTML(); return $html; }
public static function Template() { return 'etc/styles/' . ui_template::GetUserTemplate() . '/'; }
static function ExecuteCSSList() { $currentuser = ctrl_users::GetUserDetail(); return ui_template::ListAvaliableCSS(self::ExecuteShowCurrentTheme($currentuser['userid'])); }
public static function Template() { $active = isset($_REQUEST['module']) ? '' : 'class="active"'; $line = '<li ' . $active . '><a href="."><: Home :></a></li>'; $modcats = ui_moduleloader::GetModuleCats(); rsort($modcats); foreach ($modcats as $modcat) { $shortName = $modcat['mc_name_vc']; switch ($shortName) { case 'Account Information': $shortName = 'Account'; break; case 'Server Admin': $shortName = 'Admin'; break; case 'Database Management': $shortName = 'Database'; break; case 'Domain Management': $shortName = 'Domain'; break; case 'File Management': $shortName = 'File'; break; case 'Server Admin': $shortName = 'Server'; break; } $shortName = '<: ' . $shortName . ' :>'; $mods = ui_moduleloader::GetModuleList($modcat['mc_id_pk']); if ($mods) { $line .= '<li class="dropdown">'; // IF Account, show Gravatar Image if ($shortName == '<: Account :>') { $currentuser = ctrl_users::GetUserDetail(); $image = self::get_gravatar($currentuser['email'], 22, 'mm', 'g', true); $line .= '<a href="#" class="dropdown-toggle" data-toggle="dropdown">' . $image . ' ' . $shortName . ' <b class="caret"></b></a>'; } else { $line .= '<a href="#" class="dropdown-toggle" data-toggle="dropdown">' . $shortName . ' <b class="caret"></b></a>'; } $line .= '<ul class="dropdown-menu">'; foreach ($mods as $mod) { $class_name = str_replace(array(' ', '_'), '-', strtolower($mod['mo_folder_vc'])); if (isset($_GET['module']) && $_GET['module'] == $mod['mo_folder_vc']) { $line .= '<li class="active">'; } else { $line .= '<li>'; } if ($mod['mo_installed_ts'] != 0) { if (file_exists('etc/styles/' . ui_template::GetUserTemplate() . '/img/modules/' . $mod['mo_folder_vc'] . '/assets/icon.png')) { $line .= '<a href="?module=' . $mod['mo_folder_vc'] . '"><i class="icon-' . $class_name . ' greyscale"><img src="etc/styles/' . ui_template::GetUserTemplate() . '/img/modules/' . $mod['mo_folder_vc'] . '/assets/icon.png" height="16px" width="16px"></i> <: ' . $mod['mo_name_vc'] . ' :></a></li>'; } else { $line .= '<a href="?module=' . $mod['mo_folder_vc'] . '"><i class="icon-' . $class_name . ' greyscale"><img src="/modules/' . $mod['mo_folder_vc'] . '/assets/icon.png" height="16px" width="16px"></i> <: ' . $mod['mo_name_vc'] . ' :></a></li>'; } } else { $line .= '<a href="?module=' . $mod['mo_folder_vc'] . '"><i class="icon-' . $class_name . '"></i> <: ' . $mod['mo_name_vc'] . ' :></a></li>'; } } // If Account tab, show Logout Menu Item if ($shortName == '<: Account :>') { $line .= '<li><a href="?logout"><i class="icon-phpinfo"></i> Logout</a></li>'; } $line .= '</ul></li>'; } } return $line; }