Beispiel #1
0
 private function onCronjob()
 {
     ob_start();
     GWF_ModuleLoader::cronjobs();
     $back = ob_get_contents();
     ob_end_clean();
     return $back;
 }
function Upgrade_Language_1_02(Module_Language $module)
{
    echo GWF_HTML::message('GWF', 'Triggering Upgrade_Language_1_02');
    echo GWF_HTML::message('GWF', 'Removing some outdated module vars ...');
    echo GWF_HTML::message('GWF', 'Removing edit_time');
    if (false === GWF_ModuleLoader::removeModuleVar($module, 'edit_time')) {
        return GWF_HTML::err('ERR_DATABASE', array(__FILE__, __LINE__));
    }
    return '';
}
Beispiel #3
0
 private static function installPMBot(Module_PM $module)
 {
     $user = new GWF_User(array('user_name' => '_GWF_PM_BOT_', 'user_password' => 'x', 'user_regdate' => GWF_Time::getDate(GWF_Date::LEN_SECOND), 'user_regip' => GWF_IP6::getIP(GWF_IP_EXACT, '127.0.0.1'), 'user_email' => GWF_BOT_EMAIL, 'user_birthdate' => GWF_Time::getDate(GWF_Time::LEN_DAY), 'user_countryid' => 0, 'user_langid' => 0, 'user_options' => GWF_User::BOT, 'user_lastactivity' => time()));
     if (false === $user->insert()) {
         return GWF_HTML::err('ERR_DATABASE', array(__FILE__, __LINE__));
     }
     if (false === GWF_ModuleLoader::saveModuleVar($module, 'pm_bot_uid', $user->getID())) {
         return GWF_HTML::err('ERR_DATABASE', array(__FILE__, __LINE__));
     }
     return '';
 }
Beispiel #4
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;
 }
Beispiel #5
0
 public static function modules(array $modules, $dropTables = false)
 {
     $back = '';
     $modules = GWF_ModuleLoader::sortModules($modules, 'module_priority', 'ASC');
     foreach ($modules as $module) {
         $back .= sprintf('Installing %s...<br/>', $module->getName());
         $back .= GWF_ModuleLoader::installModule($module, $dropTables);
         $module->saveOption(GWF_Module::ENABLED, true);
         // TODO: gizmore.. check if bug
     }
     return $back;
 }
Beispiel #6
0
function Upgrade_GWF_3_10(Module_GWF $module)
{
    echo GWF_HTML::message('GWF', 'Triggering Upgrade_GWF_3_10');
    echo GWF_HTML::message('GWF', 'Removing some outdated module vars ...');
    echo GWF_HTML::message('GWF', 'Removing log_404');
    if (false === GWF_ModuleLoader::removeModuleVar($module, 'log_404')) {
        return GWF_HTML::err('ERR_DATABASE', array(__FILE__, __LINE__));
    }
    echo GWF_HTML::message('GWF', 'Removing mail_404');
    if (false === GWF_ModuleLoader::removeModuleVar($module, 'mail_404')) {
        return GWF_HTML::err('ERR_DATABASE', array(__FILE__, __LINE__));
    }
    return '';
}
Beispiel #7
0
 public function getForm()
 {
     $data = array();
     $data['style'] = array(GWF_Form::STRING, 'default', $this->module->lang('style'));
     $data['div'] = array(GWF_Form::HEADLINE, '', $this->module->lang('ft_zipper'));
     $modules = GWF_ModuleLoader::loadModulesFS();
     GWF_ModuleLoader::sortModules($modules, 'module_name', 'ASC');
     foreach ($modules as $m) {
         #$m instanceof GWF_Module;
         $name = $m->getName();
         $key = sprintf('mod_%s', $name);
         $data[$key] = array(GWF_Form::CHECKBOX, $m->isEnabled(), $name);
     }
     $data['zipper'] = array(GWF_Form::SUBMIT, $this->module->lang('btn_zip'));
     return new GWF_Form($this, $data);
 }
Beispiel #8
0
 public function onInstall($dropTable)
 {
     return GWF_ModuleLoader::installVars($this, array('sb_guests' => array(true, 'bool'), 'sb_guest_captcha' => array(false, 'bool'), 'sb_member_captcha' => array(false, 'bool'), 'sb_ipp' => array('25', 'int', 1, 512), 'sb_ippbox' => array('6', 'int', 1, 64), 'sb_maxlen' => array('196', 'int', 16, 1024), 'sb_timeout' => array('60', 'time', 0, GWF_Time::ONE_DAY * 2), 'sb_maxdayu' => array('12', 'int', 1, 1024), 'sb_maxdayg' => array('6', 'int', 1, 1024), 'sb_email_moderation' => array(true, 'bool')));
 }
 public static function onInstall(Module_Usergroups $module, $dropTable)
 {
     return GWF_ModuleLoader::installVars($module, array('ug_level' => array('0', 'int', '0'), 'ug_minlen' => array('3', 'int', '2', '12'), 'ug_maxlen' => array('32', 'int', '12', '48'), 'ug_ipp' => array('25', 'int', '1', '500'), 'ug_ax' => array('5', 'int', '1', '32'), 'ug_ay' => array('5', 'int', '1', '32'), 'ug_menu' => array(true, 'bool'), 'ug_submenu' => array(true, 'bool'), 'ug_submenugroup' => array('members', 'text', 0, GWF_Group::NAME_LEN), 'ug_lvl_per_grp' => array('0', 'int', '0'), 'ug_grp_per_usr' => array('1', 'int', '1')));
     //		self::installBoard($module, $dropTable);
 }
Beispiel #10
0
 public function onInstall($dropTable)
 {
     return GWF_ModuleLoader::installVars($this, array('private' => array(true, 'bool'), 'guest_public' => array(true, 'bool'), 'guest_private' => array(true, 'bool'), 'bbcode' => array(true, 'bool'), 'msg_len' => array('512', 'int', '16', '2048'), 'online_time' => array('20 seconds', 'time', '5', GWF_Time::ONE_DAY * 2), 'message_peak' => array('1 minute', 'time', '5', GWF_Time::ONE_DAY * 2), 'chat_lag_ping' => array('2', 'time', '1', '25'), 'chanmsg_per_page' => array(5, 'int', '1', '255'), 'privmsg_per_page' => array(5, 'int', '1', '255'), 'histmsg_per_page' => array(50, 'int', '1', '255'), 'chat_menu' => array(true, 'bool'), 'chat_submenu' => array(true, 'bool'), 'mibbit' => array(true, 'bool'), 'mibbit_ssl' => array(true, 'bool'), 'mibbit_server' => array('irc.idlemonkeys.net', 'text', 6, 128), 'mibbit_channel' => array('#wechall', 'text', 1, 64), 'mibbit_port' => array('7000', 'int', '1', '65535'), 'gwf_chat' => array(false, 'bool')));
 }
Beispiel #11
0
 public function onInstall($dropTable)
 {
     return GWF_ModuleLoader::installVars($this, array('captcha' => array(false, 'bool'), 'max_tries' => array('6', 'int', '1', '100'), 'try_exceed' => array('600', 'time', '0', 60 * 60 * 24), 'lf_cleanup_t' => array('1 month', 'time', '0', 60 * 60 * 24 * 365 * 8), 'lf_cleanup_i' => array(true, 'bool'), 'send_alerts' => array(true, 'bool')));
 }
Beispiel #12
0
 public function onInstall($dropTable)
 {
     return GWF_VersionFiles::populateAll() . GWF_ModuleLoader::installVars($this, array());
 }
Beispiel #13
0
 public static function onInstall(Module_Heart $module, $dropTables)
 {
     return GWF_ModuleLoader::installVars($module, array('hb_pagecount' => array('0', 'script'), 'hb_userrecord' => array('0', 'script'), 'hb_recorddate' => array('00000000000000', 'script')));
 }
Beispiel #14
0
 private static function installMoreClasses(Module_WeChall $module, $dropTable)
 {
     foreach (self::$more_classes as $classname) {
         require_once GWF_CORE_PATH . 'module/WeChall/' . $classname . '.php';
     }
     return GWF_ModuleLoader::installModuleClassesB($module, self::$more_classes, $dropTable);
 }
Beispiel #15
0
 public function onInstall($dropTable)
 {
     return GWF_ModuleLoader::installVars($this, array('email_activation' => array(true, 'bool'), 'auto_login' => array(true, 'bool'), 'country_select' => array(false, 'bool'), 'min_age' => array('0', 'int', '0', '42'), 'ip_usetime' => array('1 seconds', 'time', '0', 60 * 60 * 24 * 365), 'force_tos' => array(true, 'bool'), 'captcha' => array(false, 'bool'), 'email_twice' => array(false, 'bool'), 'plaintextpass' => array(false, 'bool'), 'activation_pp' => array('50', 'int', '1', '250'), 'ua_threshold' => array('24 hours', 'time', 60 * 15, 60 * 60 * 24 * 7), 'reg_toslink' => array(GWF_WEB_ROOT . 'tos', 'text', 0, 512), 'reg_detect_country' => array(true, 'bool')));
 }
Beispiel #16
0
 public static function install(Module_Slaytags $module, $dropTables)
 {
     return GWF_ModuleLoader::installVars($module, array('slay_time_off' => array('0', 'int', '-172800', '172800'))) . self::defaultTags($module, $dropTables);
 }
Beispiel #17
0
 public static function onInstall(Module_GWF $module, $dropTables)
 {
     return GWF_ModuleLoader::installVars($module, array('FancyIndex' => array(false, 'bool'), 'NameWidth' => array('25', 'int'), 'DescrWidth' => array('80', 'int'), 'IconWidth' => array('16', 'int'), 'IconHeight' => array('16', 'int'), 'HTMLTable' => array(false, 'bool'), 'IgnoreClient' => array(false, 'bool'), 'FoldersFirst' => array(true, 'bool'), 'IgnoreCase' => array(true, 'bool'), 'SuppressHTMLPreamble' => array(true, 'bool'), 'ScanHTMLTitles' => array(true, 'bool'), 'SuppressDescription' => array(true, 'bool'), 'SuppressRules' => array(true, 'bool'), 'log' => array('404,403', 'text'), 'mail' => array('404,403', 'text'), 'CaptchaBGColor' => array('FFFFFF', 'text'), 'CaptchaFont' => array(GWF_PATH . 'extra/font/teen.ttf', 'text'), 'CaptchaWidth' => array('210', 'int'), 'CaptchaHeight' => array('42', 'int'), 'allow_all_requests' => array(false, 'bool'), 'blacklist' => array('me=ShowError;favicon.ico[^$]', 'text')));
 }
Beispiel #18
0
 public function onInstall($dropTable)
 {
     return GWF_ModuleLoader::installVars($this, array('fee_buy' => array('1.00', 'float', '-50', '50'), 'fee_sell' => array('2.00', 'float', '-50', '50')));
 }
Beispiel #19
0
 public static function onInstall(Module_Links $module, $dropTable)
 {
     return GWF_ModuleLoader::installVars($module, array('link_long_descr' => array(false, 'bool'), 'link_guests' => array(true, 'bool'), 'link_guests_mod' => array(true, 'bool'), 'link_guests_votes' => array(false, 'bool'), 'link_guests_captcha' => array(true, 'bool'), 'link_guests_unread' => array('7 days', 'time', '0', GWF_Time::ONE_YEAR), 'link_per_page' => array('50', 'int', '1', '512'), 'link_min_level' => array('0', 'int', '0'), 'link_tag_min_level' => array('0', 'int', '0'), 'link_cost' => array('0', 'int', '0'), 'link_max_tag_len' => array('32', 'int', '8'), 'link_max_url_len' => array('255', 'int', '32'), 'link_min_descr_len' => array('8', 'int', '0', '32'), 'link_max_descr_len' => array('255', 'int', '32'), 'link_min_descr2_len' => array('0', 'int', '0', '32'), 'link_max_descr2_len' => array('512', 'int', '32'), 'link_vote_min' => array('1', 'int', '-100', '100'), 'link_vote_max' => array('5', 'int', '-100', '100'), 'show_permitted' => array(true, 'bool'), 'link_check_int' => array('0', 'time', '0'), 'link_check_amt' => array('5', 'int', '1', '200')));
 }
Beispiel #20
0
 public static function onInstall(Module_GWF $module, $dropTable)
 {
     return GWF_ModuleLoader::installVars($module, array('pagecount_on' => array(true, 'bool'), 'userrec' => array(true, 'bool'), 'userrecc' => array(0, 'script'), 'userrecd' => array('00000000000000', 'script')));
 }
Beispiel #21
0
 /**
  * Create .htaccess
  */
 public static function wizard_8()
 {
     if (false !== ($error = self::wizard_check_cfg_quick())) {
         return $error;
     }
     $back = self::wizard_h2('8');
     if (false !== GWF_ModuleLoader::reinstallHTAccess() && false !== GWF_HTAccess::installCountryRewrites()) {
         return self::wizard_message('msg_htaccess') . self::wizard_btn('9');
     }
     return self::wizard_error('err_htaccess');
 }
Beispiel #22
0
 public function onInstall($dropTable)
 {
     return GWF_ModuleLoader::installVars($this, array('ptmpw' => array('TheChosenPass', 'text', '0', '32')));
 }
Beispiel #23
0
 public static function install(Module_Download $module, $dropTable)
 {
     return GWF_ModuleLoader::installVars($module, array('anon_upload' => array(false, 'bool'), 'anon_downld' => array(true, 'bool'), 'user_upload' => array(true, 'bool'), 'dl_descr_min' => array('0', 'int', 0, 16), 'dl_descr_max' => array('512', 'int', 16, 65535), 'dl_ipp' => array('50', 'int', 1, 512), 'dl_minvote' => array('1', 'int', 0, 3), 'dl_maxvote' => array('5', 'int', 3, 100), 'dl_gvotes' => array(false, 'bool'), 'dl_gcaptcha' => array(true, 'bool'), 'dl_moderators' => array('moderator', 'text', 0, 63), 'dl_moderated' => array(true, 'bool'), 'dl_min_level' => array('0', 'int', 0, 1000000))) . self::dropVotes($module, $dropTable) . self::installDlDirs($module, $dropTable);
 }
Beispiel #24
0
 public function onInstall($dropTable)
 {
     return GWF_ModuleLoader::installVars($this, array('captcha' => array(false, 'bool'), 'mail_sender' => array(GWF_SUPPORT_EMAIL, 'text', '6', '128')));
 }
Beispiel #25
0
 public static function install(Module_Payment $module, $dropTable)
 {
     return GWF_ModuleLoader::installVars($module, array('donations' => array(true, 'bool'), 'currency' => array('EUR', 'text'), 'currencies' => array('EUR:USD', 'script'), 'global_fee_buy' => array('4.00', 'float', '-50', '50'), 'global_fee_sell' => array('8.00', 'float', '-50', '50'), 'orders_per_page' => array('50', 'int', '1', '500'))) . self::installCurrencies($module, $dropTable);
 }
Beispiel #26
0
 public static function onInstall(Module_Audit $module, $dropTable)
 {
     return GWF_ModuleLoader::installVars($module, array('logfile' => array(Module_Audit::DEFAULT_LOGFILE, 'text'))) . self::createGroups($module, $dropTable) . self::createDirs($module, $dropTable);
 }
Beispiel #27
0
 public static function onInstall(Module_Forum $module, $dropTable)
 {
     return GWF_ModuleLoader::installVars($module, array('posts_per_thread' => array('10', 'int', '1', '255'), 'threads_per_page' => array('20', 'int', '1', '255'), 'num_latest_threads' => array('8', 'int', '0', '255'), 'max_title_len' => array('128', 'int', '16', '255'), 'max_descr_len' => array('255', 'int', '16', '512'), 'max_message_len' => array('16384', 'int', '16', '65535'), 'max_sig_len' => array('512', 'int', '16', '1024'), 'guest_posts' => array(false, 'bool'), 'guest_captcha' => array(true, 'bool'), 'mod_guest_time' => array('1 day', 'time', '0', GWF_Time::ONE_MONTH), 'search' => array(true, 'bool'), 'mod_sender' => array(GWF_BOT_EMAIL, 'text', '4', GWF_User::EMAIL_LENGTH), 'mod_receiver' => array(GWF_SUPPORT_EMAIL, 'text', '4', GWF_User::EMAIL_LENGTH), 'unread' => array(true, 'bool'), 'gtranslate' => array(true, 'bool'), 'thanks' => array(true, 'bool'), 'votes' => array(true, 'bool'), 'uploads' => array(true, 'bool'), 'watch_timeout' => array('300 seconds', 'time', '0', GWF_Time::ONE_HOUR), 'postcount' => array('0', 'script'), 'doublepost' => array(true, 'bool'), 'lang_boards' => array(false, 'bool'), 'post_timeout' => array('0', 'time', 0, '172800'), 'post_min_level' => array('0', 'int', 0, '1000000'), 'gwf2_rewrites' => array(false, 'bool'))) . self::installForumDefaults($module);
 }
Beispiel #28
0
 public static function onInstall(Module_Comments $module, $dropTable)
 {
     return GWF_ModuleLoader::installVars($module, array('moderated' => array(true, 'bool'), 'guest_captcha' => array(true, 'bool'), 'member_captcha' => array(false, 'bool'), 'max_msg_len' => array('2048', 'int', '128', '65535')));
 }
Beispiel #29
0
    } else {
        $icon = $enabled ? 'enabled' : 'disabled';
    }
    $href = $installed ? $d['edit_url'] : $d['install_url'];
    $advLink = $m->hasAdminSection() ? sprintf('<a href="%s">%s</a>', $d['admin_url'], $admin_sect) : '';
    echo sprintf('<tr><td align="right"><a href="%s">%s</a></td><td>%s</td></tr>', $href, $name, $advLink);
}
?>
</table>
<div class="oa">
<?php 
$module = $tVars['cfgmodule'];
if (false !== ($error = GWF_ModuleLoader::checkModuleDependencies($module))) {
    echo $error;
}
$methods = GWF_ModuleLoader::getAllMethods($module);
if (count($methods) > 0) {
    printf('<div class="box box_c">%s</div>', $tLang->lang('info_methods', array(count($methods))));
    foreach ($methods as $method) {
        $method instanceof GWF_Method;
        if (false !== ($error = $method->checkDependencies())) {
            echo $error;
        }
    }
}
if ('cfgg_info' !== ($general = $module->lang('cfgg_info'))) {
    echo sprintf('<div>%s</div>', $general);
}
echo $tVars['form'];
echo $tVars['form_install'];
?>
Beispiel #30
0
 public static function onInstall(Module_Helpdesk $module, $dropTables)
 {
     return GWF_ModuleLoader::installVars($module, array('maxlen_title' => array('255', 'int', '8', '512'), 'maxlen_message' => array('2048', 'int', '255', '65565')));
 }