コード例 #1
0
ファイル: radius_conf.php プロジェクト: armpit/e107
 public function showForm($mes)
 {
     $ns = e107::getRender();
     $frm = new form();
     $text = $frm->form_open('post', e_SELF);
     $text .= "<table class='table adminform'>";
     $text .= "<tr><td>" . LAN_RADIUS_01 . "</td><td>";
     $text .= $frm->form_text('radius_server', 35, vartrue($this->radius['radius_server']), 120);
     $text .= "</td></tr>\n";
     $text .= "<tr><td>" . LAN_RADIUS_02 . "</td><td>";
     $text .= $frm->form_text('radius_secret', 35, vartrue($this->radius['radius_secret']), 200);
     $text .= "</td></tr>\n";
     $tmp = $this->alt_auth_get_field_list('radius', $frm, $this->radius, FALSE);
     if ($tmp) {
         $text .= "<tr><td class='forumheader2' colspan='2'>" . LAN_ALT_27 . "</td></tr>\n" . $tmp;
         unset($tmp);
     }
     $text .= "<tr><td class='forumheader' colspan='2' style='text-align:center;'>";
     // $text .= $frm -> form_button("submit", "update", LAN_ALT_2);
     $text .= e107::getForm()->admin_button('update', LAN_UPDATE, 'update');
     $text .= "</td></tr>\n";
     $text .= "</table>\n";
     $text .= $frm->form_close();
     $ns->tablerender(LAN_RADIUS_06, $mes->render() . $text);
     $ns->tablerender(LAN_ALT_40 . LAN_ALT_41, $this->alt_auth_test_form('radius', $frm));
 }
コード例 #2
0
ファイル: upload.php プロジェクト: gitye/e107
         $current_perms[e_UC_MEMBER] = array('type' => 'zip,tar,gz,jpg,png', 'maxupload' => '2M');
     }
     $text = "<div style='text-align:center'>\n\t<form method='post' action='" . e_SELF . "?filetypes'>\n\t<table style='" . ADMIN_WIDTH . "' class='fborder'>\n\t\t<colgroup>\n\t\t<col style='width:30%' />\n\t\t<col style='width:40%' />\n\t\t<col style='width:25%' />\n\t\t<col style='width:5%' />\n\t\t</colgroup>\n\t  <tr>\n\t\t<td class='forumheader3' colspan='4'><input type='hidden' name='upload_do_edit' value='1'>" . str_replace(array('--SOURCE--', '--DEST--'), array(e_UPLOAD_TEMP_DIR . e_SAVE_FILETYPES, e_ADMIN . e_READ_FILETYPES), UPLLAN_52) . "</td>\n\t  </tr>\n\t  <tr>\n\t\t<td class='forumheader3' colspan='4'>" . UPLLAN_57 . $source_file . "</td>\n\t  </tr>\n\t  <tr>\n\t\t<td class='fcaption'>" . LAN_USERCLASS . "</td>\n\t\t<td class='fcaption'>" . UPLLAN_54 . "</td>\n\t\t<td class='fcaption' style='text-align:center'>" . UPLLAN_55 . "</td>\n\t\t<td class='fcaption' style='text-align:center'>" . LAN_DELETE . "</td>\n\t  </tr>";
     foreach ($current_perms as $uclass => $uinfo) {
         $text .= "\n\t\t<tr>\n\t\t  <td class='forumheader3'><select name='file_class_select[]' class='tbox'>\n\t\t  " . $e_userclass->vetted_tree('file_class_select', array($e_userclass, 'select'), $uclass, 'member,main,classes,admin, no-excludes') . "\n\t\t  </select></td>\n\t\t  <td class='forumheader3'><input type='text' name='file_type_list[]' value='{$uinfo['type']}' class='tbox' size='40' /></td>\n\t\t  <td class='forumheader3' style='text-align:center'><input type='text' name='file_maxupload[]' value='{$uinfo['maxupload']}' class='tbox' size='10' /></td>\n\t\t  <td class='forumheader3'><input type='checkbox' value='1' name='file_line_delete_{$uclass}' /></td>\n\t\t</tr>";
     }
     // Now put up a box to add a new setting
     $text .= "\n\t  <tr>\n\t\t  <td class='forumheader3'><select name='file_class_select[]' class='tbox'>\n\t\t  " . $e_userclass->vetted_tree('file_class_select', array($e_userclass, 'select'), '', 'member,main,classes,admin,blank, no-excludes') . "\n\t\t  </select></td>\n\t\t  <td class='forumheader3'><input type='text' name='file_type_list[]' value='' class='tbox' size='40' /></td>\n\t\t  <td class='forumheader3' style='text-align:center'><input type='text' name='file_maxupload[]' value='" . ini_get('upload_max_filesize') . "' class='tbox' size='10' /></td>\n\t\t  <td class='forumheader3'>&nbsp;</td>\n\t  </tr>";
     $text .= "\n\t  <tr>\n\t\t<td class='forumheader3' style='text-align:center' colspan='4'>\n\t\t\t\t<input class='btn button' type='submit' name='generate_filetypes_xml' value='" . UPLLAN_56 . "' />\n\t\t</td>\n\t  </tr>\n\t</table></form>\n\t</div>";
     $ns->tablerender(LAN_FILETYPES, $text);
     break;
 case 'options':
     if (!getperms('0')) {
         exit;
     }
     $text = "<div style='text-align:center'>\n\t<form method='post' action='" . e_SELF . "?options'>\n\t<table style='" . ADMIN_WIDTH . "' class='fborder'>\n\t<tr>\n\t<td style='width:50%' class='forumheader3'>" . UPLLAN_25 . "<br />\n\t<span class='smalltext'>" . UPLLAN_26 . "</span></td>\n\t<td style='width:50%' class='forumheader3'>" . ($pref['upload_enabled'] == 1 ? $rs->form_radio("upload_enabled", 1, 1) . " " . LAN_YES . $rs->form_radio("upload_enabled", 0) . " " . LAN_NO : $rs->form_radio("upload_enabled", 1) . " " . LAN_YES . $rs->form_radio("upload_enabled", 0, 1) . " " . LAN_NO) . "\n\t</td>\n\t</tr>\n\n\t<tr>\n\t<td style='width:70%' class='forumheader3'>" . UPLLAN_33 . "<br />\n\t<span class='smalltext'>" . UPLLAN_34 . " (upload_max_filesize = " . ini_get('upload_max_filesize') . ", post_max_size = " . ini_get('post_max_size') . " )</span></td>\n\t<td style='width:30%' class='forumheader3'>" . $rs->form_text("upload_maxfilesize", 10, $pref['upload_maxfilesize'], 10) . "\n\t</td>\n\t</tr>\n\n\t<tr>\n\t<td style='width:70%' class='forumheader3'>" . UPLLAN_37 . "<br />\n\t<span class='smalltext'>" . UPLLAN_38 . "</span></td>\n\t<td style='width:30%' class='forumheader3'>" . r_userclass("upload_class", $pref['upload_class'], "off", "nobody,public,guest,member,admin,classes") . "\n\n\t</td>\n\t</tr>\n\n\t<tr>\n\t<td colspan='2' class='forumheader' style='text-align:center'>" . $rs->form_button("submit", "optionsubmit", LAN_SUBMIT) . "\n\t</td>\n\t</tr>\n\t</table>" . $rs->form_close() . "\n\t</div>";
     $ns->tablerender(LAN_OPTIONS, $text);
     break;
 case 'view':
     $sql->db_Select('upload', '*', "upload_id='{$id}'");
     $row = $sql->db_Fetch();
     extract($row);
     $post_author_id = substr($upload_poster, 0, strpos($upload_poster, "."));
     $post_author_name = substr($upload_poster, strpos($upload_poster, ".") + 1);
     $poster = !$post_author_id ? "<b>" . $post_author_name . "</b>" : "<a href='" . e_BASE . "user.php?id." . $post_author_id . "'><b>" . $post_author_name . "</b></a>";
     $upload_datestamp = $gen->convert_date($upload_datestamp, "long");
     $text = "<div style='text-align:center'>\n\t\t<table style='" . ADMIN_WIDTH . "' class='fborder'>\n\t\t<colgroup>\n\t\t<col style='width:30%' />\n\t\t<col style='width:70%' />\n\t\t</colgroup>\n\n\t\t<tr>\n\t\t<td class='forumheader3'>" . LAN_ID . "</td>\n\t\t<td class='forumheader3'>{$upload_id}</td>\n\t\t</tr>\n\n\t\t<tr>\n\t\t<td class='forumheader3'>" . LAN_DATE . "</td>\n\t\t<td class='forumheader3'>{$upload_datestamp}</td>\n\t\t</tr>\n\n\t\t<tr>\n\t\t<td class='forumheader3'>" . UPLLAN_5 . "</td>\n\t\t<td class='forumheader3'>{$poster}</td>\n\t\t</tr>\n\n\t\t<tr>\n\t\t<td class='forumheader3'>" . UPLLAN_6 . "</td>\n\t\t<td class='forumheader3'><a href='mailto:{$upload_email}'>{$upload_email}</td>\n\t\t</tr>\n\n\t\t<tr>\n\t\t<td class='forumheader3'>" . UPLLAN_7 . "</td>\n\t\t<td class='forumheader3'>" . ($upload_website ? "<a href='{$upload_website}'>{$upload_website}</a>" : " - ") . "</td>\n\t\t</tr>\n\n\t\t<tr>\n\t\t<td class='forumheader3'>" . LAN_FILE_NAME . "</td>\n\t\t<td class='forumheader3'>" . ($upload_name ? $upload_name : " - ") . "</td>\n\t\t</tr>\n\n\t\t<tr>\n\t\t<td class='forumheader3'>" . LAN_VERSION . "</td>\n\t\t<td class='forumheader3'>" . ($upload_version ? $upload_version : " - ") . "</td>\n\t\t</tr>\n\n\t\t<tr>\n\t\t<td class='forumheader3'>" . LAN_FILE . "</td>\n\t\t<td class='forumheader3'>" . (is_numeric($upload_file) ? "Binary file ID " . $upload_file : "<a href='" . e_SELF . "?dl.{$upload_file}'>{$upload_file}</a>") . "</td>\n\t\t</tr>\n\n\t\t<tr>\n\t\t<td class='forumheader3'>" . LAN_SIZE . "</td>\n\t\t<td class='forumheader3'>" . $e107->parseMemorySize($upload_filesize) . "</td>\n\t\t</tr>\n\n\t\t<tr>\n\t\t<td class='forumheader3'>" . LAN_SCREENSHOT . "</td>\n\t\t<td class='forumheader3'>" . ($upload_ss ? "<a href='" . e_BASE . "request.php?upload." . $upload_id . "'>" . $upload_ss . "</a>" : " - ") . "</td>\n\t\t</tr>\n\n\t\t<tr>\n\t\t<td class='forumheader3'>" . LAN_DESCRIPTION . "</td>\n\t\t<td class='forumheader3'>{$upload_description}</td>\n\t\t</tr>\n\n\t\t<tr>\n\t\t<td class='forumheader3'>" . UPLLAN_14 . "</td>\n\t\t<td class='forumheader3'>" . ($upload_demo ? $upload_demo : " - ") . "</td>\n\t\t</tr>\n\n\t\t<tr>\n\t\t<td class='forumheader3'>" . LAN_OPTIONS . "</td>\n\t\t<td class='forumheader3'><a href='" . e_SELF . "?dlm.{$upload_id}'>" . UPLAN_COPYTODLM . "</a> | <a href='" . e_SELF . "?news.{$upload_id}'>" . UPLLAN_16 . "</a> | <a href='" . e_SELF . "?dis.{$upload_id}'>" . UPLLAN_17 . "</a></td>\n\t\t</tr>\n\n\t\t</table>\n\t\t</div>";
     $ns->tablerender(UPLLAN_18, $text);
     // Intentionally fall through into list mode
 // Intentionally fall through into list mode
 case 'list':
コード例 #3
0
ファイル: form.php プロジェクト: Alver23/FormGenerator
<?php

#Created by Michel Gomes Ank
#E-mail: michel@lafanet.com.br
#MSN: mitheus@bol.com.br
#ICQ: 530377777
require "lib/class.php";
#------------------------------------ [START] GENERATE THE FORM ----------------------------------#
$form = new form();
$print = $form->form_start("cadastro", "", "POST");
$print .= $form->form_text("Name", "name", "40", "Your Full Name", "maxlength=\"200\"", "<b>Ex:</b> Michel Gomes Ank");
$print .= $form->form_select("Country", "country", "1", "Canada,Brazil,EUA,Japan", "C,B,E,J", "B");
$print .= $form->form_checkbox("You know the Brazil?", "brazil", "checked", "1");
$print .= $form->form_textarea("More information", "more_inf", "5", "30");
$print .= $form->form_file("Photo", "photo", "", "Files of type: .jpg");
$print .= $form->form_go("Send", "Clear");
$print .= $form->form_end();
echo $print;
#------------------------------------- [END] GENERATE THE FORM -----------------------------------#
//crear archivo php
$contenido = $print;
$fp = fopen("archivo.php", "x");
fwrite($fp, $contenido);
fclose($fp);
コード例 #4
0
ファイル: content_preset.php プロジェクト: Jimmi08/content
                header('location:' . e_BASE . 'index.php');
                exit;
        }
    }
    if (!$err) {
        $value = $tp->post_toForm($value);
        $js = "\t\t\n\t\t<script type='text/javascript'>\n\n\t\tvar ecopy\t\t= 'upline_new';\n\t\tvar epaste\t\t= 'div_content_custom_preset';\n\t\tvar type\t\t= window.opener.document.getElementById(ecopy).nodeName; // get the tag name of the source copy.\n\t\tvar br\t\t\t= window.opener.document.createElement('br');\n\n\t\tvar field\t\t= window.opener.document.createElement('input');\n\t\tfield.type\t\t= 'text';\n\t\tfield.size\t\t= '50';\n\t\tfield.name\t\t= 'content_custom_preset_key[]';\n\t\tfield.value\t\t= '" . $value . "';\n\t\tfield.className\t= 'tbox';\n\n\t\tvar but\t\t\t= window.opener.document.createElement('input');\n\t\tbut.type\t\t= 'button';\n\t\tbut.value\t\t= 'x';\n\t\tbut.className\t= 'button';\n\t\tbut.onclick\t\t= function(){ this.parentNode.parentNode.removeChild(this.parentNode); };\n\n\t\tvar destination = window.opener.document.getElementById(epaste);\n\t\tvar source      = window.opener.document.getElementById(ecopy).cloneNode(true);\n\t\tvar newentry\t= window.opener.document.createElement(type);\n\n\t\tnewentry.appendChild(source);\n\t\tnewentry.value='';\n\t\tnewentry.appendChild(br);\n\t\tnewentry.appendChild(field);\n\t\tnewentry.appendChild(but);\n\t\tnewentry.appendChild(br);\n\n\t\tdestination.appendChild(newentry);\n\n\t\twindow.close();\n\t\t</script>\n\n\t\t";
    }
}
$text .= "\n<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.1//EN\" \"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd'>\n\n<html>\n\n<head>\n\n<title>" . CONTENT_PRESET_LAN_7 . "</title>\n\n<meta http-equiv='content-type' content='text/html; charset=" . CHARSET . "' />\n\n<script type='text/javascript' src='../../../e107_files/e107.js'></script>\n" . $js . "\n<style type='text/css'>\n\nhtml,body{\n\ttext-align:center;\n\tfont-family: verdana, arial, helvetica, tahoma, sans-serif;\n\tfont-size: 11px;\n\tcolor: #444;\n\tmargin-left: auto;\n  \tmargin-right: auto;\t\n  \tmargin-top:0px;\n\tmargin-bottom:0px;\n\tpadding: 0px;\n\tbackground-color:#FFF;\n\theight:100%;\n\tcursor:default;\n}\ntd{\n\tpadding:5px;\n\tfont-size:11px;\n\ttext-align:left;\n}\n.fborder{\n\twidth:80%;\n\tmargin:0;\n\tpadding:0;\n}\n.fcaption{\n\tfont-size:12px;\n\tfont-weight:bold;\n\twhite-space:nowrap;\n}\n.err{\n\tfont-size:11px;\n\tfont-weight:bold;\n\tcolor: #FF0000;\n}\n.leftcell{\n\twidth:10%;\n\twhite-space:nowrap;\n}\n.button{\n\tpadding:2px;\n\tcursor:pointer;\n}\n.example {\n\tborder: #999 1px dashed;\n\tpadding: 5px;\n\tmargin: 5px;\n\tbackground-color: #f7f7f9;\n}\n</style>\n</head>\n<body onload=self.focus()>";
$opt = '';
if (e_QUERY) {
    $qs = explode(".", e_QUERY);
    $opt = $tp->toDB($qs[0]);
}
$text .= "\n<form method='post' action='" . e_SELF . "?" . e_QUERY . "'>\n\n<table class='fborder' style='width:350px;'>\n" . ($err ? "<tr><td colspan='2' class='err' style='padding-bottom:10px;'>" . $err . "</td></tr>" : "") . "\n<tr><td colspan='2' class='fcaption' style='padding-bottom:10px;'>" . CONTENT_PRESET_LAN_8 . " : " . $opt . "</td></tr>\n<tr><td class='leftcell'>" . CONTENT_PRESET_LAN_9 . "</td><td>" . $rs->form_text("field", 40, $_POST['field'], 50) . "</td></tr>";
switch ($opt) {
    case 'text':
        $text .= "\n\t\t<tr><td class='leftcell'>" . CONTENT_PRESET_LAN_10 . "</td><td>" . $rs->form_text("text_size", 3, $_POST['text_size'], 3) . "</td></tr>\n\t\t<tr><td class='leftcell'>" . CONTENT_PRESET_LAN_11 . "</td><td>" . $rs->form_text("text_maxsize", 3, $_POST['text_maxsize'], 3) . "</td></tr>\n\t\t";
        $example = CONTENT_PRESET_LAN_32 . "<br /><br />" . $rs->form_text("extext", 40, CONTENT_PRESET_LAN_9 . "=" . CONTENT_PRESET_LAN_32 . ", " . CONTENT_PRESET_LAN_10 . "=40, " . CONTENT_PRESET_LAN_11 . "=10", 100);
        break;
    case 'area':
        $text .= "\n\t\t<tr><td class='leftcell'>" . CONTENT_PRESET_LAN_12 . "</td><td>" . $rs->form_text("area_cols", 3, $_POST['area_cols'], 3) . "</td></tr>\n\t\t<tr><td class='leftcell'>" . CONTENT_PRESET_LAN_13 . "</td><td>" . $rs->form_text("area_rows", 3, $_POST['area_rows'], 3) . "</td></tr>\n\t\t";
        $example = CONTENT_PRESET_LAN_32 . "<br /><br />" . $rs->form_textarea("exarea", 30, 4, "" . CONTENT_PRESET_LAN_9 . "=" . CONTENT_PRESET_LAN_32 . "\n" . CONTENT_PRESET_LAN_12 . "=30\n" . CONTENT_PRESET_LAN_13 . "=4", $form_js = "", $form_style = "", $form_wrap = "", $form_readonly = "", $form_tooltip = "");
        break;
    case 'date':
        $text .= "\n\t\t<tr><td class='leftcell'>" . CONTENT_PRESET_LAN_14 . "</td><td>" . $rs->form_text("date_year_from", 3, $_POST['date_year_from'], 4) . "</td></tr>\n\t\t<tr><td class='leftcell'>" . CONTENT_PRESET_LAN_15 . "</td><td>" . $rs->form_text("date_year_to", 3, $_POST['date_year_to'], 4) . "</td></tr>\n\t\t";
        $example = CONTENT_PRESET_LAN_32 . " " . CONTENT_PRESET_LAN_14 . " 1990, " . CONTENT_PRESET_LAN_15 . " 2000<br /><br />\n\t\t\t" . $rs->form_select_open("exday", "") . "\n\t\t\t" . $rs->form_option(CONTENT_ADMIN_DATE_LAN_12, "0", "");
        for ($i = 1; $i <= 31; $i++) {
            $example .= $rs->form_option($i, $values[$tmp[0]]['day'] == $i ? "1" : "0", $i, "");
        }
コード例 #5
0
ファイル: banner.php プロジェクト: notzen/e107
            }
            $textstring .= preg_replace("/\\{(.*?)\\}/e", '$\\1', $BANNER_TABLE);
        }
    }
    if (!$BANNER_TABLE) {
        if (file_exists(THEME . "banner_template.php")) {
            require THEME . "banner_template.php";
        } else {
            require e_BASE . $THEMES_DIRECTORY . "templates/banner_template.php";
        }
    }
    $textstart = preg_replace("/\\{(.*?)\\}/e", '$\\1', $BANNER_TABLE_START);
    $textend = preg_replace("/\\{(.*?)\\}/e", '$\\1', $BANNER_TABLE_END);
    $text = $textstart . $textstring . $textend;
    echo $text;
    require_once FOOTERF;
    exit;
}
$BANNER_LOGIN_TABLE_LOGIN = $rs->form_text("clientlogin", 30, $id, 20, "tbox");
$BANNER_LOGIN_TABLE_PASSW = $rs->form_password("clientpassword", 30, "", 20, "tbox");
$BANNER_LOGIN_TABLE_SUBMIT = $rs->form_button("submit", "clientsubmit", LAN_CONTINUE);
if (!$BANNER_LOGIN_TABLE) {
    if (file_exists(THEME . "banner_template.php")) {
        require_once THEME . "banner_template.php";
    } else {
        require_once e_BASE . $THEMES_DIRECTORY . "templates/banner_template.php";
    }
}
$text = preg_replace("/\\{(.*?)\\}/e", '$\\1', $BANNER_LOGIN_TABLE);
$ns->tablerender(BANNERLAN_19, $text);
require_once FOOTERF;
コード例 #6
0
ファイル: radius_conf.php プロジェクト: notzen/e107
    // $message .= "<br /><br /><div style='color:#f00; font-weight:bold'>".LAN_RADIUS_11."</div><br />";
    $mes->addWarning(LAN_RADIUS_11);
}
if ($message) {
    $ns->tablerender("", "<div style='text-align:center;'>" . $message . "</div>");
}
$sql->db_Select("alt_auth", "*", "auth_type = 'radius' ");
while ($row = $sql->db_Fetch()) {
    $radius[$row['auth_parmname']] = base64_decode(base64_decode($row['auth_parmval']));
    // Encoding is new for 0.8
}
$frm = new form();
$text = $frm->form_open("post", e_SELF);
$text .= "<table class='table adminform'>";
$text .= "<tr><td>" . LAN_RADIUS_01 . "</td><td>";
$text .= $frm->form_text("radius_server", 35, $radius['radius_server'], 120);
$text .= "</td></tr>";
$text .= "<tr><td>" . LAN_RADIUS_02 . "</td><td>";
$text .= $frm->form_text('radius_secret', 35, $radius['radius_secret'], 200);
$text .= "</td></tr>";
$tmp = alt_auth_get_field_list('radius', $frm, $ldap, FALSE);
if ($tmp) {
    $text .= "<tr><td class='forumheader2' colspan='2'>" . LAN_ALT_27 . "</td></tr>" . $tmp;
    unset($tmp);
}
$text .= "<tr><td class='forumheader' colspan='2' style='text-align:center;'>";
// $text .= $frm -> form_button("submit", "update", LAN_ALT_2);
$text .= e107::getForm()->admin_button("update", LAN_UPDATE, 'update');
$text .= "</td></tr>";
$text .= "</table>";
$text .= $frm->form_close();
コード例 #7
0
ファイル: admin_pdf_config.php プロジェクト: notzen/e107
    }
    // Now get the info on each font.
    foreach ($fontList as $font => $info) {
        $fontList[$font]['info'] = getFontInfo($info['base']);
    }
    //print_a($fontList);
    return $fontList;
}
$fontList = getFontList();
$coreList = array();
foreach ($fontList as $font => $info) {
    if ($info['info']['type'] == 'core') {
        $coreList[$font] = $font;
    }
}
$text = "\n<div style='text-align:center'>\n" . $rs->form_open("post", e_SELF, "pdfform", "", "enctype='multipart/form-data'") . "\n<table class='fborder' style='" . ADMIN_WIDTH . "'>\n\n<tr>\n\t<td class='forumheader3' style='width:30%; white-space:nowrap;'>" . PDF_LAN_5 . "</td>\n\t<td class='forumheader3' style='width:70%;'>" . $rs->form_text("pdf_margin_left", 10, $pdfpref['pdf_margin_left'], 10) . "</td>\n</tr>\n<tr>\n\t<td class='forumheader3' style='width:30%; white-space:nowrap;'>" . PDF_LAN_6 . "</td>\n\t<td class='forumheader3' style='width:70%;'>" . $rs->form_text("pdf_margin_right", 10, $pdfpref['pdf_margin_right'], 10) . "</td>\n</tr>\n<tr>\n\t<td class='forumheader3' style='width:30%; white-space:nowrap;'>" . PDF_LAN_7 . "</td>\n\t<td class='forumheader3' style='width:70%;'>" . $rs->form_text("pdf_margin_top", 10, $pdfpref['pdf_margin_top'], 10) . "</td>\n</tr>";
$text .= "\n<tr>\n\t<td class='forumheader3' style='width:30%; white-space:nowrap;'>" . PDF_LAN_8 . "</td>\n\t<td class='forumheader3' style='width:70%;'>\n\t\t" . $rs->form_select_open("pdf_font_family");
foreach ($coreList as $font => $info) {
    $text .= $rs->form_option($font, $pdfpref['pdf_font_family'] == $font ? "1" : "0", $font);
}
$text .= $rs->form_select_close() . "\n\t</td>\n</tr>\n\n<tr>\n\t<td class='forumheader3' style='width:30%; white-space:nowrap;'>" . PDF_LAN_9 . "</td>\n\t<td class='forumheader3' style='width:70%;'>" . $rs->form_text("pdf_font_size", 10, $pdfpref['pdf_font_size'], 10) . "</td>\n</tr>\n<tr>\n\t<td class='forumheader3' style='width:30%; white-space:nowrap;'>" . PDF_LAN_10 . "</td>\n\t<td class='forumheader3' style='width:70%;'>" . $rs->form_text("pdf_font_size_sitename", 10, $pdfpref['pdf_font_size_sitename'], 10) . "</td>\n</tr>\n<tr>\n\t<td class='forumheader3' style='width:30%; white-space:nowrap;'>" . PDF_LAN_11 . "</td>\n\t<td class='forumheader3' style='width:70%;'>" . $rs->form_text("pdf_font_size_page_url", 10, $pdfpref['pdf_font_size_page_url'], 10) . "</td>\n</tr>\n<tr>\n\t<td class='forumheader3' style='width:30%; white-space:nowrap;'>" . PDF_LAN_12 . "</td>\n\t<td class='forumheader3' style='width:70%;'>" . $rs->form_text("pdf_font_size_page_number", 10, $pdfpref['pdf_font_size_page_number'], 10) . "</td>\n</tr>\n<tr>\n\t<td class='forumheader3' style='width:30%; white-space:nowrap;'>" . PDF_LAN_13 . "</td>\n\t<td class='forumheader3' style='width:70%;'>\n\t\t" . $rs->form_radio("pdf_show_logo", "1", $pdfpref['pdf_show_logo'] ? "1" : "0", "", "") . PDF_LAN_3 . "\n\t\t" . $rs->form_radio("pdf_show_logo", "0", $pdfpref['pdf_show_logo'] ? "0" : "1", "", "") . PDF_LAN_4 . "\n\t</td>\n</tr>\n<tr>\n\t<td class='forumheader3' style='width:30%; white-space:nowrap;'>" . PDF_LAN_14 . "</td>\n\t<td class='forumheader3' style='width:70%;'>\n\t\t" . $rs->form_radio("pdf_show_sitename", "1", $pdfpref['pdf_show_sitename'] ? "1" : "0", "", "") . PDF_LAN_3 . "\n\t\t" . $rs->form_radio("pdf_show_sitename", "0", $pdfpref['pdf_show_sitename'] ? "0" : "1", "", "") . PDF_LAN_4 . "\n\t</td>\n</tr>\n<tr>\n\t<td class='forumheader3' style='width:30%; white-space:nowrap;'>" . PDF_LAN_15 . "</td>\n\t<td class='forumheader3' style='width:70%;'>\n\t\t" . $rs->form_radio("pdf_show_page_url", "1", $pdfpref['pdf_show_page_url'] ? "1" : "0", "", "") . PDF_LAN_3 . "\n\t\t" . $rs->form_radio("pdf_show_page_url", "0", $pdfpref['pdf_show_page_url'] ? "0" : "1", "", "") . PDF_LAN_4 . "\n\t</td>\n</tr>\n<tr>\n\t<td class='forumheader3' style='width:30%; white-space:nowrap;'>" . PDF_LAN_16 . "</td>\n\t<td class='forumheader3' style='width:70%;'>\n\t\t" . $rs->form_radio("pdf_show_page_number", "1", $pdfpref['pdf_show_page_number'] ? "1" : "0", "", "") . PDF_LAN_3 . "\n\t\t" . $rs->form_radio("pdf_show_page_number", "0", $pdfpref['pdf_show_page_number'] ? "0" : "1", "", "") . PDF_LAN_4 . "\n\t</td>\n</tr>\n<tr>\n\t<td class='forumheader3' style='width:30%; white-space:nowrap;'>" . PDF_LAN_20 . "</td>\n\t<td class='forumheader3' style='width:70%;'>\n\t\t" . $rs->form_radio("pdf_error_reporting", "1", $pdfpref['pdf_error_reporting'] ? "1" : "0", "", "") . PDF_LAN_3 . "\n\t\t" . $rs->form_radio("pdf_error_reporting", "0", $pdfpref['pdf_error_reporting'] ? "0" : "1", "", "") . PDF_LAN_4 . "\n\t</td>\n</tr>\n\n<tr>\n\t<td style='text-align:center' class='forumheader' colspan='2'>" . $rs->form_button("submit", "update_pdf", PDF_LAN_17) . "</td>\n</tr>\n\n</table>\n" . $rs->form_close() . "\n</div>";
$ns->tablerender(PDF_LAN_2, $text);
$text = "<div style='text-align:center;>\n\n<table cellpadding='0' cellspacing='0' class='adminform'>\n<tr><th>" . PDF_LAN_21 . "</th><th>" . PDF_LAN_22 . "</th><th>" . PDF_LAN_23 . "</th>\n\t<th>" . PDF_LAN_24 . "</th><th title='" . PDF_LAN_25 . "'>" . PDF_LAN_26 . "</th></tr>\n";
foreach ($fontList as $font => $info) {
    $wa = array(PDF_LAN_27);
    if (isset($info['b'])) {
        $wa[] = PDF_LAN_28;
    }
    if (isset($info['i'])) {
        $wa[] = PDF_LAN_29;
    }
コード例 #8
0
ファイル: ldap_conf.php プロジェクト: notzen/e107
}
//print_a($ldap);
$current_filter = "(&(cn=[USERNAME]){$ldap['ldap_edirfilter']})";
$frm = new form();
$text = $frm->form_open('post', e_SELF);
$text .= "<table class='table adminform'>";
$text .= "<tr><td>" . LDAPLAN_12 . "</td><td>";
$text .= $frm->form_select_open("ldap_servertype");
foreach ($server_types as $v) {
    $sel = $ldap['ldap_servertype'] == $v ? " Selected='selected'" : '';
    $text .= $frm->form_option($v, $sel, $v);
}
$text .= $frm->form_select_close();
$text .= "</td></tr>";
$text .= "<tr><td>" . LDAPLAN_1 . "</td><td>";
$text .= $frm->form_text("ldap_server", 35, $ldap['ldap_server'], 120);
$text .= "</td></tr>";
$text .= "<tr><td>" . LDAPLAN_2 . "</td><td>";
$text .= $frm->form_text("ldap_basedn", 35, $ldap['ldap_basedn'], 120);
$text .= "</td></tr>";
$text .= "<tr><td>" . LDAPLAN_14 . "</td><td>";
$text .= $frm->form_text("ldap_ou", 35, $ldap['ldap_ou'], 60);
$text .= "</td></tr>";
$text .= "<tr><td>" . LDAPLAN_3 . "</td><td>";
$text .= $frm->form_text("ldap_user", 35, $ldap['ldap_user'], 120);
$text .= "</td></tr>";
$text .= "<tr><td>" . LDAPLAN_4 . "</td><td>";
$text .= $frm->form_text("ldap_passwd", 35, $ldap['ldap_passwd'], 120);
$text .= "</td></tr>";
$text .= "<tr><td>" . LDAPLAN_5 . "</td><td>";
$text .= $frm->form_select_open("ldap_version");
コード例 #9
0
ファイル: pm_conf.php プロジェクト: notzen/e107
function show_options($pm_prefs)
{
    $txt = "\n\t<fieldset id='plugin-pm-prefs'>\n\t<form method='post' action='" . e_SELF . "'>\n\t<table class='table adminform'>\n\t<colgroup span='2'>\n\t\t<col class='col-label' />\n\t\t<col class='col-control' />\n\t</colgroup>\n\t<tbody>\n\t<tr>\n\t\t<td>" . ADLAN_PM_16 . "</td>\n\t\t<td>" . form::form_text('pm_option-title', 20, $pm_prefs['title'], 50) . "</td>\n\t</tr>\n\t<tr>\n\t\t<td>" . ADLAN_PM_17 . "</td>\n\t\t<td>" . yes_no('pm_option-animate', $pm_prefs['animate']) . "</td>\n\t</tr>\n\t<tr>\n\t\t<td>" . ADLAN_PM_18 . "</td>\n\t\t<td>" . yes_no('pm_option-dropdown', $pm_prefs['dropdown']) . "</td>\n\t</tr>\n\t<tr>\n\t\t<td>" . ADLAN_PM_19 . "</td>\n\t\t<td>" . form::form_text('pm_option-read_timeout', 5, $pm_prefs['read_timeout'], 5) . "</td>\n\t</tr>\n\t<tr>\n\t\t<td>" . ADLAN_PM_20 . "</td>\n\t\t<td>" . form::form_text('pm_option-unread_timeout', 5, $pm_prefs['unread_timeout'], 5) . "</td>\n\t</tr>\n\t<tr>\n\t\t<td>" . ADLAN_PM_21 . "</td>\n\t\t<td>" . yes_no('pm_option-popup', $pm_prefs['popup']) . "</td>\n\t</tr>\n\t<tr>\n\t\t<td>" . ADLAN_PM_22 . "</td>\n\t\t<td>" . form::form_text('pm_option-popup_delay', 5, $pm_prefs['popup_delay'], 5) . " " . ADLAN_PM_44 . "</td>\n\t</tr>\n\t<tr>\n\t\t<td>" . ADLAN_PM_23 . "</td>\n\t\t<td>" . e107::getUserClass()->uc_dropdown('pm_option-pm_class', $pm_prefs['pm_class'], 'member,admin,classes') . "</td>\n\t</tr>\n\t<tr>\n\t\t<td>" . ADLAN_PM_24 . "</td>\n\t\t<td>" . form::form_text('pm_option-perpage', 5, $pm_prefs['perpage'], 5) . "</td>\n\t</tr>\n\t<tr>\n\t\t<td>" . ADLAN_PM_25 . "</td>\n\t\t<td>" . e107::getUserClass()->uc_dropdown('pm_option-notify_class', $pm_prefs['notify_class'], 'nobody,member,admin,classes') . "</td>\n\t</tr>\n\t<tr>\n\t\t<td>" . ADLAN_PM_26 . "</td>\n\t\t<td>" . e107::getUserClass()->uc_dropdown('pm_option-receipt_class', $pm_prefs['receipt_class'], 'nobody,member,admin,classes') . "</td>\n\t</tr>\n\t<tr>\n\t\t<td>" . ADLAN_PM_27 . "</td>\n\t\t<td>" . e107::getUserClass()->uc_dropdown('pm_option-attach_class', $pm_prefs['attach_class'], 'nobody,member,admin,classes') . "</td>\n\t</tr>\n\t<tr>\n\t\t<td>" . ADLAN_PM_28 . "</td>\n\t\t<td>" . form::form_text('pm_option-attach_size-', 8, $pm_prefs['attach_size'], 8) . " kB</td>\n\t</tr>\n\t<tr>\n\t\t<td>" . ADLAN_PM_29 . "</td>\n\t\t<td>" . e107::getUserClass()->uc_dropdown('pm_option-sendall_class', $pm_prefs['sendall_class'], 'nobody,member,admin,classes') . "</td>\n\t</tr>\n\t<tr>\n\t\t<td>" . ADLAN_PM_30 . "</td>\n\t\t<td>" . e107::getUserClass()->uc_dropdown('pm_option-multi_class', $pm_prefs['multi_class'], 'nobody,member,admin,classes') . "</td>\n\t</tr>\n\t<tr>\n\t\t<td>" . ADLAN_PM_31 . "</td>\n\t\t<td>" . e107::getUserClass()->uc_dropdown('pm_option-opt_userclass', $pm_prefs['opt_userclass'], 'nobody,member,admin,classes') . "</td>\n\t</tr>\n\t<tr>\n\t\t<td>" . ADLAN_PM_81 . "</td>\n\t\t<td>" . form::form_text('pm_option-pm_max_send', 5, $pm_prefs['pm_max_send'], 5) . "<span style='field-help'>" . ADLAN_PM_82 . "</span></td>\n\t</tr>\n\t</tbody>\n\t</table>\n\t<div class='buttons-bar center'>\n\t" . e107::getForm()->admin_button('update_prefs', 'no-value', 'update', ADLAN_PM_32) . "\n\t</div>\n\t</form>\n\t</fieldset>\n\t";
    return $txt;
}
コード例 #10
0
ファイル: ldap_conf.php プロジェクト: armpit/e107
 public function showForm($mes)
 {
     $server_types[1] = 'LDAP';
     $server_types[2] = 'ActiveDirectory';
     $server_types[3] = 'eDirectory';
     $ldap_ver[1] = '2';
     $ldap_ver[2] = '3';
     $ldap = $this->altAuthGetParams('ldap');
     if (!isset($ldap['ldap_edirfilter'])) {
         $ldap['ldap_edirfilter'] == '';
     }
     //print_a($ldap);
     $current_filter = "(&(cn=[USERNAME]){$ldap['ldap_edirfilter']})";
     $frm = new form();
     $text = $frm->form_open('post', e_SELF);
     $text .= "<table class='table adminform'>";
     $text .= "<tr><td>" . LDAPLAN_12 . "</td><td>";
     $text .= $frm->form_select_open("ldap_servertype");
     foreach ($server_types as $v) {
         $sel = vartrue($ldap['ldap_servertype']) == $v ? " Selected='selected'" : '';
         $text .= $frm->form_option($v, $sel, $v);
     }
     $text .= $frm->form_select_close();
     $text .= "</td></tr>";
     $text .= "<tr><td>" . LDAPLAN_1 . "</td><td>";
     $text .= $frm->form_text("ldap_server", 35, vartrue($ldap['ldap_server']), 120);
     $text .= "</td></tr>";
     $text .= "<tr><td>" . LDAPLAN_2 . "</td><td>";
     $text .= $frm->form_text("ldap_basedn", 35, vartrue($ldap['ldap_basedn']), 120);
     $text .= "</td></tr>";
     $text .= "<tr><td>" . LDAPLAN_14 . "</td><td>";
     $text .= $frm->form_text("ldap_ou", 35, vartrue($ldap['ldap_ou']), 60);
     $text .= "</td></tr>";
     $text .= "<tr><td>" . LDAPLAN_3 . "</td><td>";
     $text .= $frm->form_text("ldap_user", 35, vartrue($ldap['ldap_user']), 120);
     $text .= "</td></tr>";
     $text .= "<tr><td>" . LDAPLAN_4 . "</td><td>";
     $text .= $frm->form_text("ldap_passwd", 35, vartrue($ldap['ldap_passwd']), 120);
     $text .= "</td></tr>";
     $text .= "<tr><td>" . LDAPLAN_5 . "</td><td>";
     $text .= $frm->form_select_open("ldap_version");
     foreach ($ldap_ver as $v) {
         $sel = $ldap['ldap_version'] == $v ? " Selected='selected'" : "";
         $text .= $frm->form_option($v, $sel, $v);
     }
     $text .= $frm->form_select_close();
     $text .= "</td></tr>";
     $text .= "<tr><td>" . LDAPLAN_7 . "<br /><span class='smalltext'>" . LDAPLAN_8 . "</span></td><td>";
     $text .= $frm->form_text('ldap_edirfilter', 35, $ldap['ldap_edirfilter'], 120);
     $text .= "<br /><span class='smalltext'>" . LDAPLAN_9 . "<br />" . htmlentities($current_filter) . "</span></td></tr>";
     $text .= "<tr><td class='forumheader2' colspan='2'>" . LAN_ALT_27 . "</td></tr>";
     $this->add_extended_fields();
     $text .= $this->alt_auth_get_field_list('ldap', $frm, $ldap, FALSE);
     $text .= "<tr><td class='forumheader' colspan='2' style='text-align:center;'>";
     $text .= e107::getForm()->admin_button("update", LAN_UPDATE, 'update');
     //$text .= $frm -> form_button('submit', 'update', LDAPLAN_13);
     $text .= "</td></tr>";
     $text .= "</table>\n";
     $text .= $frm->form_close();
     e107::getRender()->tablerender(LDAPLAN_6, $mes->render() . $text);
     e107::getRender()->tablerender(LAN_ALT_40 . LAN_ALT_41, $this->alt_auth_test_form('ldap', $frm));
 }
コード例 #11
0
ファイル: process.php プロジェクト: Alver23/FormGenerator
                 $print .= $form->form_checkbox($_POST['campoName'][$x], $_POST['campoName'][$x], $check, "1");
                 break;
             case 'radio':
                 break;
             case 'texto':
                 $Long = 25;
                 $cadena = "";
                 $aut = 0;
                 if ($_POST['obligatorio'][$x] == "Si") {
                     $cadena = "requerido";
                 }
                 if ($_POST['autocompletar'][$x] == "Si") {
                     $cadena = "autocompletar";
                     $aut = 1;
                 }
                 $print .= $form->form_text($_POST['campoName'][$x], $_POST['campoName'][$x], $Long, "", "class=\"" . $_POST['obligatorio'][$x] . "\"", "", $aut);
                 break;
         }
     }
 }
 #EndFor
 #Finalizamos el form
 $print .= $form->form_go("Guardar", "Limpiar");
 $print .= $form->form_end();
 if (!file_exists("templates/views/")) {
     if (!mkdir("templates/views/", 0777, true)) {
         die('Fallo al crear las carpetas...');
     }
 }
 #Generar Archivo cshtml
 if (file_exists("templates/views/" . $_POST['tabla'] . "Form.php")) {