Ejemplo n.º 1
0
 private static function installWebspiders(Module_Admin $module, $dropTables)
 {
     $back = '';
     require_once GWF_CORE_PATH . 'module/Admin/GWF_AdminWebSpiders.php';
     if ($module->cfgInstallSpiders()) {
         $back .= GWF_AdminWebSpiders::install($module, $dropTables);
         GWF_ModuleLoader::saveModuleVar($module, 'install_webspiders', 'NO');
     }
     $back .= GWF_AdminWebSpiders::installHide($module, $module->cfgHideSpiders());
     return $back;
 }
Ejemplo n.º 2
0
 private function templateUserEdit()
 {
     $u = $this->user;
     $form = $this->getForm();
     $tVars = array('form' => $form->templateY($this->module->lang('ft_useredit', array($u->displayUsername()))), 'href_login_as' => Module_Admin::getLoginAsURL($u->urlencode('user_name')), 'href_user_groups' => GWF_WEB_ROOT . 'index.php?mo=Admin&me=UserGroup&uid=' . $u->getID(), 'user' => $u);
     return $this->module->templatePHP('user_edit.php', $tVars);
 }
Ejemplo n.º 3
0
 private function templateModules()
 {
     $gdo = GDO::table('GWF_Module');
     $by = $gdo->getWhitelistedBy(Common::getGetString('by'), 'module_name');
     $dir = GDO::getWhitelistedDirS(Common::getGetString('dir', 'ASC'));
     $headers = array(array($this->module->lang('th_priority'), 'module_priority', 'ASC'), array($this->module->lang('th_move')), array($this->module->lang('th_name'), 'module_name', 'ASC'), array($this->module->lang('th_version_db')), array($this->module->lang('th_version_hd')), array($this->module->lang('th_install')), array($this->module->lang('th_basic')), array($this->module->lang('th_adv')));
     $modules = $this->module->getAllModules($by, $dir);
     # Need install?
     $install_all = '';
     foreach ($modules as $name => $d) {
         if (!$d['enabled']) {
             continue;
         }
         if ($d['vdb'] < $d['vfs']) {
             $install_all = $this->module->lang('install_info', array(Module_Admin::getInstallAllURL()));
             break;
         }
     }
     $tVars = array('modules' => $modules, 'install_all' => $install_all, 'tablehead' => GWF_Table::displayHeaders1($headers, Module_Admin::getSortURL('%BY%', '%DIR%'), 'module_name', 'ASC'), 'install' => $this->module->lang('btn_install'), 'configure' => $this->module->lang('btn_config'), 'adminsect' => $this->module->lang('btn_admin_section'));
     return $this->module->template('modules.tpl', $tVars);
 }
Ejemplo n.º 4
0
<?php

echo $tVars['search_form'];
$headers = array(array($tLang->lang('th_userid'), 'user_id', 'ASC'), array($tLang->lang('th_user_credits'), 'user_credits', 'ASC'), array($tLang->lang('th_user_level'), 'user_level', 'ASC'), array($tLang->lang('th_country'), 'user_countryid', 'ASC'), array($tLang->lang('th_user_name'), 'user_name', 'ASC'), array($tLang->lang('th_regdate'), 'user_regdate', 'ASC'), array($tLang->lang('th_email'), 'user_email', 'ASC'), array($tLang->lang('th_birthdate'), 'user_birthdate', 'ASC'), array($tLang->lang('th_regip'), 'user_regip', 'ASC'), array($tLang->lang('th_lastactivity'), 'user_lastactivity', 'DESC'));
echo $tVars['pagemenu'];
echo GWF_Table::start();
echo GWF_Table::displayHeaders1($headers);
foreach ($tVars['users'] as $user) {
    echo GWF_Table::rowStart();
    $user instanceof GWF_User;
    $href = Module_Admin::getUserEditURL($user->getID());
    echo GWF_Table::column(GWF_HTML::anchor($href, $user->getID()), 'gwf_num');
    echo GWF_Table::column(GWF_HTML::anchor($href, round($user->getVar('user_credits')), 2), 'gwf_num');
    echo GWF_Table::column(GWF_HTML::anchor($href, $user->getLevel()), 'gwf_num');
    echo GWF_Table::column(sprintf('<a href="%s">%s</a>', $href, $user->displayCountryFlag()));
    echo GWF_Table::column(GWF_HTML::anchor($href, $user->display('user_name')));
    echo GWF_Table::column(GWF_HTML::anchor($href, GWF_Time::displayDate($user->getVar('user_regdate'))), 'gwf_date');
    echo GWF_Table::column(GWF_HTML::anchor($href, $user->display('user_email')));
    echo GWF_Table::column(GWF_HTML::anchor($href, GWF_Time::displayDate($user->getVar('user_birthdate'))), 'gwf_date');
    echo GWF_Table::column(GWF_HTML::anchor($href, GWF_IP6::displayIP($user->getVar('user_regip'), GWF_IP_EXACT)));
    echo GWF_Table::column(GWF_HTML::anchor($href, GWF_Time::displayTimestamp($user->getVar('user_lastactivity'))), 'gwf_date');
    echo GWF_Table::rowEnd();
}
echo GWF_Table::end();
echo $tVars['pagemenu'];
Ejemplo n.º 5
0
 public function onInstall($modulename, $dropTable)
 {
     if (false === ($modules = GWF_ModuleLoader::loadModulesFS())) {
         return GWF_HTML::err('ERR_MODULE_MISSING', array(GWF_HTML::display($modulename)));
     }
     if (!isset($modules[$modulename])) {
         return GWF_HTML::err('ERR_MODULE_MISSING', array(GWF_HTML::display($modulename)));
     }
     $install = $modules[$modulename];
     $install instanceof GWF_Module;
     $errors = GWF_ModuleLoader::installModule($install, $dropTable);
     if ($errors !== '') {
         return $errors . $this->module->error('err_install') . $this->module->requestMethodB('Modules');
     }
     //		if (false === ($install->saveOption(GWF_Module::ENABLED, true))) {
     //			return
     //				GWF_HTML::err('ERR_DATABASE', array( __FILE__, __LINE__)).
     //				$this->module->message('err_install').$this->module->requestMethodB('Modules');
     //		}
     GWF_ModuleLoader::installHTAccess($modules);
     $msg = $dropTable === true ? 'msg_wipe' : 'msg_install';
     return $this->module->message($msg, array(GWF_HTML::display($modulename))) . $this->module->message('msg_installed', array(Module_Admin::getEditURL($modulename), GWF_HTML::display($modulename)));
 }
Ejemplo n.º 6
0
 public function validate_join(Module_Admin $m, $arg)
 {
     return GWF_GroupSelect::isValidJoinFlag((int) $arg) ? false : $m->lang('err_group_join');
 }