Example #1
0
    }
    $message .= "<br />";
    $message .= "</div>";
    $input .= "\n\n?>";
    // Write to file.
    $fp = @fopen($writeit, "w");
    if (!@fwrite($fp, $input)) {
        $caption = LAN_CHECK_PAGE_TITLE . ' - ' . LAN_ERROR;
        $message = '';
        $emessage->add(LAN_CHECK_17, E_MESSAGE_ERROR);
    } else {
        $caption = LAN_CHECK_PAGE_TITLE . ' - ' . LAN_CHECK_24;
        $emessage->add(sprintf(LAN_CHECK_23, basename($writeit)), E_MESSAGE_SUCCESS);
    }
    fclose($writeit);
    $message .= "\n\t<form method='post' action='" . e_SELF . "' id='core-lancheck-save-file-form'>\n\t<div class='center'>\n\t\t" . $frm->admin_button('language_sel', LAN_BACK) . "\n\t\t" . $frm->hidden('language', $lan) . "\n\t</div>\n\t</form>";
    $e107->ns->tablerender($caption, $emessage->render() . $message);
    require_once e_ADMIN . "footer.php";
    exit;
}
// ============================================================================
// Edit the Language File.
if ($f != "") {
    if (!$mode) {
        $dir1 = e_BASE . $LANGUAGES_DIRECTORY . "English/";
        $f1 = $f;
        $dir2 = e_BASE . $LANGUAGES_DIRECTORY . $lan . "/";
        $f2 = $f;
    } else {
        $fullpath_orig = $f;
        $fullpath_trans = str_replace("English", $lan, $f);
Example #2
0
     break;
     // End case 'transfer'
 // End case 'transfer'
 case 'list':
 case 'white':
 default:
     if ($action != 'list' && $action != 'white') {
         $action = 'list';
     }
     $edit_action = $action == 'list' ? 'edit' : 'whedit';
     $del_action = $action == 'list' ? 'remove' : 'whremove';
     $col_widths = array('list' => array(10, 5, 35, 30, 10, 10), 'white' => array(15, 40, 35, 10));
     $col_titles = array('list' => array(BANLAN_17, BANLAN_20, BANLAN_10, BANLAN_19, BANLAN_18, LAN_OPTIONS), 'white' => array(BANLAN_55, BANLAN_56, BANLAN_19, LAN_OPTIONS));
     $no_values = array('list' => BANLAN_2, 'white' => BANLAN_54);
     $col_defs = array('list' => array('banlist_datestamp' => 0, 'banlist_bantype' => 0, 'ip_reason' => BANLAN_7, 'banlist_notes' => 0, 'banlist_banexpires' => 0, 'ban_options' => 0), 'white' => array('banlist_datestamp' => 0, 'ip_reason' => BANLAN_57, 'banlist_notes' => 0, 'ban_options' => 0));
     $text = "\n\t\t\t<form method='post' action='" . e_SELF . '?' . $action . "' id='core-banlist-form'>\n\t\t\t\t<fieldset id='core-banlist'>\n\t\t\t\t\t<legend class='e-hideme'>" . ($action == 'list' ? BANLAN_3 : BANLAN_61) . "</legend>\n\t\t\t\t\t" . $frm->hidden("ban_secure", "1") . "\n\t\t";
     $filter = $action == 'white' ? 'banlist_bantype=' . eIPHandler::BAN_TYPE_WHITELIST : 'banlist_bantype!=' . eIPHandler::BAN_TYPE_WHITELIST;
     if (!($ban_total = $sql->db_Select("banlist", "*", $filter . " ORDER BY banlist_ip"))) {
         $text .= "<div class='center'>" . $no_values[$action] . "</div>";
     } else {
         $text .= "\n\t\t\t\t\t<table class='table adminlist'>\n\t\t\t\t\t\t<colgroup>\n\t\t\t";
         foreach ($col_widths[$action] as $fw) {
             $text .= "\n\t\t\t\t\t\t\t\t<col style='width:{$fw}%' />\n\t\t\t\t";
         }
         $text .= "\n\t\t\t\t\t\t</colgroup>\n\t\t\t\t\t\t<thead>\n\t\t\t\t\t\t\t<tr>\n\t\t\t";
         $cnt = 0;
         foreach ($col_titles[$action] as $ct) {
             $cnt++;
             $text .= "<th" . ($cnt == count($col_widths[$action]) ? " class='center last'" : "") . ">{$ct}</th>";
         }
         $text .= "</tr>\n\t\t\t\t\t\t</thead>\n\t\t\t\t\t\t<tbody>";