本文整理汇总了PHP中select::set_style方法的典型用法代码示例。如果您正苦于以下问题:PHP select::set_style方法的具体用法?PHP select::set_style怎么用?PHP select::set_style使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类select
的用法示例。
在下文中一共展示了select::set_style方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: confirm
}
if ($gma->getValue("sedit") == 1) {
echo "|" . $ASTATUS[1];
}
if ($gma->getValue("sdelete") == 1) {
echo "|" . $ASTATUS[2];
}
echo '] </td>';
echo '<td><a href="index.php?page=module&modul_id=' . $modul_id . '&function_action=delete&function=edit&iaction_id=' . $iaction_id . '" onclick="return confirm(\'' . $I18N->msg('delete') . ' ?\')">' . $I18N->msg("action_delete") . '</a></td>';
echo '</tr>';
$gma->next();
}
$gaa_sel = new select();
$gaa_sel->set_name("action_id");
$gaa_sel->set_size(1);
$gaa_sel->set_style('class="inp100"');
for ($i = 0; $i < $gaa->getRows(); $i++) {
$status = "";
if ($gaa->getValue("sadd") == 1) {
$status .= "|" . $ASTATUS[0];
}
if ($gaa->getValue("sedit") == 1) {
$status .= "|" . $ASTATUS[1];
}
if ($gaa->getValue("sdelete") == 1) {
$status .= "|" . $ASTATUS[2];
}
$gaa_sel->add_option($gaa->getValue("name") . " [" . $PREPOST[$gaa->getValue("prepost")] . "{$status}]", $gaa->getValue("id"));
$gaa->next();
}
echo '<form action="index.php#action" method="post">';
示例2: select
// --------------------------------------------------- INHALTE KOPIEREN START
if (($REX_USER->isValueOf("rights", "admin[]") || $REX_USER->isValueOf("rights", "copyContent[]")) && count($REX['CLANG']) > 1) {
echo "\n <form action=index.php method=get>\n <input type=hidden name=page value=content>\n <input type=hidden name=article_id value='{$article_id}'>\n <input type=hidden name=mode value='meta'>\n <input type=hidden name=clang value={$clang}>\n <input type=hidden name=ctype value={$ctype}>\n <input type=hidden name=function value=copycontent>";
$lang_a = new select();
$lang_a->set_name("clang_a");
$lang_a->set_style("width:100px;");
$lang_a->set_size(1);
foreach ($REX['CLANG'] as $val => $key) {
$lang_a->add_option($key, $val);
}
if (isset($_REQUEST["clang_a"])) {
$lang_a->set_selected($_REQUEST["clang_a"]);
}
$lang_b = new select();
$lang_b->set_name("clang_b");
$lang_b->set_style("width:100px;");
$lang_b->set_size(1);
foreach ($REX['CLANG'] as $val => $key) {
$lang_b->add_option($key, $val);
}
if (isset($_REQUEST["clang_b"])) {
$lang_b->set_selected($_REQUEST["clang_b"]);
}
echo "<tr><td class=grey width=150>" . $I18N->msg("content_contentoflang") . "</td><td class=grey>" . $lang_a->out() . " " . $I18N->msg("content_to") . " " . $lang_b->out() . " " . $I18N->msg("content_copy") . "</td></tr>";
echo "<tr>\n <td class=grey> </td>\n <td class=grey><input type=submit value='" . $I18N->msg("content_submitcopycontent") . "' size=8></td>\n </tr>";
echo "</form>";
}
// --------------------------------------------------- INHALTE KOPIEREN ENDE
// --------------------------------------------------- ARTIKEL VERSCHIEBEN START
if ($article->getValue("startpage") == 0 && ($REX_USER->isValueOf("rights", "admin[]") || $REX_USER->isValueOf("rights", "moveArticle[]"))) {
print "<form action=index.php method=get>\n\t\t\t\t\t\t<input type=hidden name=page value=content>\n\t\t\t\t\t\t<input type=hidden name=article_id value='{$article_id}'>\n\t\t\t\t\t\t<input type=hidden name=category_id_old value='{$category_id}'>\n\t\t\t\t\t\t<input type=hidden name=mode value='meta'>\n\t\t\t\t\t\t<input type=hidden name=clang value={$clang}>\n\t\t\t\t\t\t<input type=hidden name=ctype value={$ctype}>\n\t\t\t\t\t\t<input type=hidden name=function value=movearticle>";
示例3: htmlspecialchars
$echo .= "\r\n <td><a href={$kat_link}>" . $KAT->getValue("catname") . " </a></td>\r\n <td valign=middle width=20>" . htmlspecialchars($KAT->getValue("catprior")) . "</td>\r\n <td>" . $I18N->msg("no_permission_to_edit") . "</td><td class=grey>{$kat_status}</td>\r\n </tr>";
}
}
$KAT->next();
}
echo $echo;
echo "</table>";
// --------------------------------------------- ARTIKEL LISTE
// --------------------- READ TEMPLATES
if ($category_id > -1) {
$TEMPLATES = new sql();
$TEMPLATES->setQuery("select * from " . $REX['TABLE_PREFIX'] . "template order by name");
$TMPL_SEL = new select();
$TMPL_SEL->set_name("template_id");
$TMPL_SEL->set_size(1);
$TMPL_SEL->set_style("width:150");
$TMPL_SEL->add_option($I18N->msg("option_no_template"), "0");
for ($i = 0; $i < $TEMPLATES->getRows(); $i++) {
if ($TEMPLATES->getValue("active") == 1) {
$TMPL_SEL->add_option($TEMPLATES->getValue("name"), $TEMPLATES->getValue("id"));
}
$TEMPLATE_NAME[$TEMPLATES->getValue("id")] = $TEMPLATES->getValue("name");
$TEMPLATES->nextValue();
}
$TEMPLATE_NAME[0] = $I18N->msg("template_default_name");
// --------------------- ARTIKEL LIST
echo " <br><table class=rex style=table-layout:auto; cellpadding=5 cellspacing=1>\r\n <tr>\r\n <th class=icon>";
if ($KATPERM && !$REX_USER->isValueOf("rights", "editContentOnly[]")) {
echo "<a href=index.php?page=structure&category_id={$category_id}&function=add_art&clang={$clang}><img src=pics/document_plus.gif width=16 height=16 border=0 alt=\"" . $I18N->msg("article_add") . "\" title=\"" . $I18N->msg("article_add") . "\"></a>";
} else {
echo " ";
示例4: array
// $STYLE= "onchange='document.forms[0].submit();'";
$sel_cat->set_selectextra('onchange="document.forms[0].submit();"');
$sel_cat->add_option($I18N_SIMPLE_SHOP->msg("please_choose_a_cat"), "100000000000000000");
$cat_ids = array();
if ($rootCats = OOCategory::getRootCategories()) {
foreach ($rootCats as $rootCat) {
add_cat_options($sel_cat, $rootCat, $cat_ids);
}
}
echo "\n <table class=rex border=0 cellpadding=5 cellspacing=1 width=770>\n <tr>\n <th class=icon> </th>\n <th colspan=2 align=left>" . $I18N_SIMPLE_SHOP->msg("product_overview") . "</th>\n </tr>\n <tr>\n <form action='index.php' method='post' name=catsearch>\n <input type='hidden' name='page' value='" . $mypage . "' />\n <input type='hidden' name='clang' value='" . $clang . "' />\n \n <td class=grey> </td>\n <td class=grey width=280>\n " . $sel_cat->out() . "\n </td>\n <td class=grey>\n <table border=0 cellspacing=0 cellpadding=0>\n <td>\n <input type=submit name='cs' value='" . $I18N_SIMPLE_SHOP->msg("show") . "' />\n </td></form><form action='index.php' method='post' name=catsearch>\n <input type='hidden' name='clang' value='" . $clang . "' />\n <input type='hidden' name='page' value='" . $mypage . "' />\n <input type='hidden' name='articlesearch' value='' />\n <td>\n <input type=submit name='cs' value='" . $I18N_SIMPLE_SHOP->msg("show_all") . "' />\n </td></form><form action='index.php' method='post' name=catsearch>\n <input type='hidden' name='clang' value='" . $clang . "' />\n <input type='hidden' name='page' value='" . $mypage . "' />\n <input type='hidden' name='articlesearch' value='0' />\n <td>\n <input type=submit name='cs' value='" . $I18N_SIMPLE_SHOP->msg("show_wo_cat") . "' />\n </td></form>\n </table>\n </td>\n </tr>\n </table>";
$STYLE = "";
if ($function == "edit_article") {
// ---------------> Artikel wird editiert oder angelegt
$sel_cat = new select();
$sel_cat->multiple(1);
$sel_cat->set_style("width:100%;");
$sel_cat->set_size(20);
$sel_cat->set_name("article[cat][]");
$cat_ids = array();
if ($rootCats = OOCategory::getRootCategories()) {
foreach ($rootCats as $rootCat) {
add_cat_options($sel_cat, $rootCat, $cat_ids);
}
}
if ($send == 1) {
//------------------> Das Formular wurde abgeschickt
if ($article[name] == "") {
$article[name] = "[leer]";
}
$sql = new sql();
$sql->debugsql = 0;
示例5: elseif
$FILESQL->setValue("filesize", ${$FILESIZE});
$FILESQL->insert();
$meta_sql->setValue("file", $NFILENAME);
}
} elseif (${$FILEDEL} == "on") {
$meta_sql->setValue("file", '');
}
// ----------------------------- / FILE UPLOAD
$meta_sql->update();
$article->setQuery("select * from rex_article where id='{$article_id}'");
$err_msg = $I18N->msg("metadata_updated") . $message;
generateArticle($article_id);
}
$typesel = new select();
$typesel->set_name("type_id");
$typesel->set_style("width:100%;");
$typesel->set_size(1);
$typesql = new sql();
$typesql->setQuery("select * from rex_article_type order by name");
for ($i = 0; $i < $typesql->getRows(); $i++) {
$typesel->add_option($typesql->getValue("name"), $typesql->getValue("type_id"));
$typesql->next();
}
$typesel->set_selected($article->getValue("type_id"));
if ($typesql->getRows() == 1) {
$out = "<input type=hidden name=type_id value=1>";
} else {
$out = "<tr><td class=grey>" . $I18N->msg("article_type_list_name") . "</td><td class=grey>" . $typesel->out() . "</td></tr>";
}
echo "\t<table border=0 cellpadding=5 cellspacing=1 width=100%>\r\n\t\t\t\t<form action=index.php method=post ENCTYPE=multipart/form-data>\r\n\t\t\t\t<input type=hidden name=page value=content>\r\n\t\t\t\t<input type=hidden name=article_id value='{$article_id}'>\r\n\t\t\t\t<input type=hidden name=mode value='meta'>\r\n\t\t\t\t<input type=hidden name=save value=1>\r\n\t\t\t\t<tr>\r\n\t\t\t\t\t<td colspan=2>" . $I18N->msg("general") . "</td>\r\n\t\t\t\t</tr>";
if ($err_msg != "") {
示例6: getArticle
function getArticle()
{
global $module_id, $FORM, $REX_USER, $REX, $REX_SESSION, $I18N;
if ($REX[GG]) {
if ($this->article_id != 0) {
$this->contents = "";
if ($REX[BF]) {
$filename = $REX[INCLUDE_PATH] . "/generated/articles/" . $this->article_id . ".bcontent";
} else {
$filename = $REX[INCLUDE_PATH] . "/generated/articles/" . $this->article_id . ".content";
}
if ($fd = @fopen($filename, "r")) {
$this->contents = fread($fd, filesize($filename));
fclose($fd);
eval($this->contents);
}
}
} else {
if ($this->article_id != 0) {
// ---------- select alle slices eines artikels
$this->CONT = new sql();
$this->CONT->setQuery("select rex_modultyp.name, rex_modultyp.ausgabe, rex_modultyp.bausgabe, rex_modultyp.eingabe, rex_modultyp.php_enable, rex_modultyp.html_enable, rex_article_slice.*, rex_article.category_id\n from\n rex_article_slice\n left join rex_modultyp on rex_article_slice.modultyp_id=rex_modultyp.id\n left join rex_article on rex_article_slice.article_id=rex_article.id\n where\n rex_article_slice.article_id='" . $this->article_id . "'\n order by\n rex_article_slice.re_article_slice_id");
// ---------- SLICE IDS/MODUL SETZEN
for ($i = 0; $i < $this->CONT->getRows(); $i++) {
$RE_CONTS[$this->CONT->getValue("re_article_slice_id")] = $this->CONT->getValue("rex_article_slice.id");
if ($REX[BF]) {
$RE_MODUL_OUT[$this->CONT->getValue("re_article_slice_id")] = $this->CONT->getValue("rex_modultyp.bausgabe");
} else {
$RE_MODUL_OUT[$this->CONT->getValue("re_article_slice_id")] = $this->CONT->getValue("rex_modultyp.ausgabe");
}
$RE_MODUL_IN[$this->CONT->getValue("re_article_slice_id")] = $this->CONT->getValue("rex_modultyp.eingabe");
$RE_MODUL_NAME[$this->CONT->getValue("re_article_slice_id")] = $this->CONT->getValue("rex_modultyp.name");
$RE_MODUL_PHP[$this->CONT->getValue("re_article_slice_id")] = $this->CONT->getValue("rex_modultyp.php_enable");
$RE_MODUL_HTML[$this->CONT->getValue("re_article_slice_id")] = $this->CONT->getValue("rex_modultyp.html_enable");
$RE_C[$this->CONT->getValue("re_article_slice_id")] = $i;
$this->CONT->nextValue();
}
// ---------- moduleselect
if ($this->mode == "edit") {
// auslesen ob php/html rechte
$add_sql = "";
$MODULE_PERM[php] = $REX_USER->isValueOf("rights", "module[php]");
$MODULE_PERM[html] = $REX_USER->isValueOf("rights", "module[html]");
if (!$MODULE_PERM[php]) {
$add_sql = "where php_enable='0'";
}
if (!$MODULE_PERM[html]) {
if ($add_sql != "") {
$add_sql .= " and html_enable='0'";
} else {
$add_sql = "where html_enable='0'";
}
}
$MODULE = new sql();
$MODULE->setQuery("select * from rex_modultyp {$add_sql} order by name");
$MODULESELECT = new select();
$MODULESELECT->set_name("module_id");
$MODULESELECT->set_size(1);
$MODULESELECT->set_style("width:100%;' onchange='this.form.submit();");
$MODULESELECT->add_option("---------------------------- " . $I18N->msg("add_block"), '');
for ($i = 0; $i < $MODULE->getRows(); $i++) {
$MODULESELECT->add_option($MODULE->getValue("name"), $MODULE->getValue("id"));
$MODULE->next();
}
}
// ---------- SLICE IDS SORTIEREN UND AUSGEBEN
$I_ID = 0;
$PRE_ID = 0;
$this->article_content = "";
$this->CONT->resetCounter();
for ($i = 0; $i < $this->CONT->getRows(); $i++) {
// ------------- EINZELNER SLICE - AUSGABE
$this->CONT->counter = $RE_C[$I_ID];
$slice_content = "";
$SLICE_SHOW = TRUE;
if ($this->mode == "edit") {
$this->ViewSliceId = $RE_CONTS[$I_ID];
$amodule = "\n <table cellspacing=0 cellpadding=5 border=0 width=100%>\n <form action=index.php";
if ($this->setanker) {
$amodule .= "#addslice";
}
$amodule .= " method=get>\n <input type=hidden name=article_id value={$this->article_id}>\n <input type=hidden name=page value=content>\n <input type=hidden name=mode value={$this->mode}>\n <input type=hidden name=slice_id value={$I_ID}>\n <input type=hidden name=function value=add>\n <tr>\n <td class=dblue>" . $MODULESELECT->out() . "</td>\n </tr></form></table>";
$fmenue = "\n <a name=slice{$RE_CONTS[$I_ID]}></a>\n <table width=100% cellspacing=0 cellpadding=5 border=0>\n <tr>\n <td class=blue width=380><b>{$RE_MODUL_NAME[$I_ID]}</b></td>\n <td class=llblue align=center><a href=index.php?page=content&article_id={$this->article_id}&mode=edit&slice_id={$RE_CONTS[$I_ID]}&function=edit#slice{$RE_CONTS[$I_ID]} class=green12b><b>" . $I18N->msg('edit') . "</b></a></td>\n <td class=llblue align=center><a href=index.php?page=content&article_id={$this->article_id}&mode=edit&slice_id={$RE_CONTS[$I_ID]}&function=delete#slice{$RE_CONTS[$I_ID]} class=red12b><b>" . $I18N->msg('delete') . "</b></a></td>\n </tr>\n </table>";
$p_menue = "\n <table width=100% cellspacing=0 cellpadding=5 border=0>\n <tr>\n <td class=blue> MODUL: <b>{$RE_MODUL_NAME[$I_ID]}</b> | <b>" . $I18N->msg('no_editing_rights') . "</b></td>\n </tr>\n </table>";
$tbl_head = "<table width=100% cellspacing=0 cellpadding=5 border=0><tr><td class=lblue>";
$tbl_bott = "</td></tr></table>";
// && ( $RE_MODUL_PHP[$module_id] == 0 || $MODULE_PERM[php] ) && ( $RE_MODUL_HTML[$module_id] == 0 || $MODULE_PERM[html] )
if ($this->function == "add" && $this->slice_id == $I_ID) {
$slice_content = $this->addSlice($I_ID, $module_id);
} else {
$slice_content .= $amodule;
}
if ($this->function == "edit" && $this->slice_id == $RE_CONTS[$I_ID] && ($RE_MODUL_PHP[$I_ID] == 0 || $MODULE_PERM[php]) && ($RE_MODUL_HTML[$I_ID] == 0 || $MODULE_PERM[html])) {
$slice_content .= $fmenue . $tbl_head . $this->editSlice($RE_CONTS[$I_ID], $RE_MODUL_IN[$I_ID]) . $tbl_bott;
} elseif ($this->function == "delete" && $this->slice_id == $RE_CONTS[$I_ID]) {
$slice_content .= $fmenue . $tbl_head . $this->deleteSlice($RE_CONTS[$I_ID], $RE_MODUL_OUT[$I_ID], $PRE_ID) . $tbl_bott;
} else {
if (!$MODULE_PERM[html] && $RE_MODUL_HTML[$I_ID]) {
$this->mode = "";
$slice_content .= $p_menue . $tbl_head . $RE_MODUL_OUT[$I_ID] . $tbl_bott;
//.........这里部分代码省略.........
示例7: select
if (!isset($_POST['save'])) {
if (isset($file) and $cssFileName == $file or isset($_POST['fileEdit']) and $cssFileName == $_POST['fileEdit']) {
$selected = 'selected="selected"';
} else {
$selected = '';
}
}
$cssSelectFile .= '<option value="' . $cssFileName . '" ' . $selected . '>' . $cssFileName . '</option>' . "\n";
}
} else {
$errorMsg .= '<p class="warning"><strong>Es sind keine CSS Files vorhanden.</strong></p>';
}
// Build the Medienpool Dirs as Select List
////////////////////////////////////////////////////////////////////////////////
$cats_sel = new select();
$cats_sel->set_style('class="form-select"');
$cats_sel->set_size(1);
$cats_sel->set_id("dirCreate");
$cats_sel->set_name("dirCreate");
$cats_sel->add_option($I18N->msg('pool_kats_no'), "0");
$mediacat_ids = array();
$rootCat = 0;
if ($rootCats = OOMediaCategory::getRootCategories()) {
foreach ($rootCats as $rootCat) {
add_mediacat_options_wperm($cats_sel, $rootCat, $mediacat_ids);
}
}
if (!isset($rex_file_category)) {
$rex_file_category = '';
}
$cats_sel->set_selected($rex_file_category);
示例8: getArticle
function getArticle()
{
global $module_id, $FORM, $REX_USER, $REX, $REX_SESSION, $REX_ACTION, $I18N;
if ($REX[GG]) {
if ($this->article_id != 0) {
$this->contents = "";
$filename = $REX[INCLUDE_PATH] . "/generated/articles/" . $this->article_id . "." . $this->clang . ".content";
if ($fd = @fopen($filename, "r")) {
$this->contents = fread($fd, filesize($filename));
fclose($fd);
eval($this->contents);
}
}
} else {
if ($this->article_id != 0) {
// ---------- select alle slices eines artikels
$sql = "select rex_modultyp.id, rex_modultyp.name, rex_modultyp.ausgabe, rex_modultyp.eingabe, rex_modultyp.php_enable, rex_modultyp.html_enable, rex_article_slice.*, rex_article.re_id\r\n\t\t\t\t\tfrom\r\n\t\t\t\t\t\trex_article_slice\r\n\t\t\t\t\tleft join rex_modultyp on rex_article_slice.modultyp_id=rex_modultyp.id\r\n\t\t\t\t\tleft join rex_article on rex_article_slice.article_id=rex_article.id\r\n\t\t\t\t\twhere\r\n\t\t\t\t\t\trex_article_slice.article_id='" . $this->article_id . "' and \r\n\t\t\t\t\t\trex_article_slice.clang='" . $this->clang . "' and \r\n\t\t\t\t\t\trex_article.clang='" . $this->clang . "' \r\n\t\t\t\t\torder by\r\n\t\t\t\t\t\trex_article_slice.re_article_slice_id";
$this->CONT = new sql();
$this->CONT->setQuery($sql);
// ---------- SLICE IDS/MODUL SETZEN
for ($i = 0; $i < $this->CONT->getRows(); $i++) {
$RE_CONTS[$this->CONT->getValue("re_article_slice_id")] = $this->CONT->getValue("rex_article_slice.id");
$RE_CONTS_CTYPE[$this->CONT->getValue("re_article_slice_id")] = $this->CONT->getValue("rex_article_slice.ctype");
$RE_MODUL_OUT[$this->CONT->getValue("re_article_slice_id")] = $this->CONT->getValue("rex_modultyp.ausgabe");
$RE_MODUL_IN[$this->CONT->getValue("re_article_slice_id")] = $this->CONT->getValue("rex_modultyp.eingabe");
$RE_MODUL_ID[$this->CONT->getValue("re_article_slice_id")] = $this->CONT->getValue("rex_modultyp.id");
$RE_MODUL_NAME[$this->CONT->getValue("re_article_slice_id")] = $this->CONT->getValue("rex_modultyp.name");
$RE_C[$this->CONT->getValue("re_article_slice_id")] = $i;
$this->CONT->nextValue();
}
// ---------- moduleselect
if ($this->mode == "edit") {
$MODULE = new sql();
$MODULE->setQuery("select * from rex_modultyp {$add_sql} order by name");
$MODULESELECT = new select();
$MODULESELECT->set_name("module_id");
$MODULESELECT->set_size(1);
$MODULESELECT->set_style("width:100%;' onchange='this.form.submit();");
$MODULESELECT->add_option("---------------------------- " . $I18N->msg("add_block"), '');
for ($i = 0; $i < $MODULE->getRows(); $i++) {
if ($REX_USER->isValueOf("rights", "module[" . $MODULE->getValue("id") . "]") || $REX_USER->isValueOf("rights", "admin[]") || $REX_USER->isValueOf("rights", "dev[]")) {
$MODULESELECT->add_option($MODULE->getValue("name"), $MODULE->getValue("id"));
}
$MODULE->next();
}
}
// ---------- SLICE IDS SORTIEREN UND AUSGEBEN
$I_ID = 0;
$PRE_ID = 0;
$this->article_content = "";
$this->CONT->resetCounter();
$tbl_head = "<table width=100% cellspacing=0 cellpadding=5 border=0><tr><td class=lblue>";
$tbl_bott = "</td></tr></table>";
for ($i = 0; $i < $this->CONT->getRows(); $i++) {
// ------------- EINZELNER SLICE - AUSGABE
$this->CONT->counter = $RE_C[$I_ID];
$slice_content = "";
$SLICE_SHOW = TRUE;
if ($this->mode == "edit") {
$this->ViewSliceId = $RE_CONTS[$I_ID];
$amodule = "\r\n\t\t\t\t\t\t<table cellspacing=0 cellpadding=5 border=0 width=100%>\r\n\t\t\t\t\t\t<form action=index.php";
if ($this->setanker) {
$amodule .= "#addslice";
}
$amodule .= " method=get>\r\n\t\t\t\t\t\t<input type=hidden name=article_id value={$this->article_id}>\r\n\t\t\t\t\t\t<input type=hidden name=page value=content>\r\n\t\t\t\t\t\t<input type=hidden name=mode value={$this->mode}>\r\n\t\t\t\t\t\t<input type=hidden name=slice_id value={$I_ID}>\r\n\t\t\t\t\t\t<input type=hidden name=function value=add>\r\n\t\t\t\t\t\t<input type=hidden name=clang value=" . $this->clang . ">\r\n\t\t\t\t\t\t<input type=hidden name=ctype value=" . $this->ctype . ">\r\n\t\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t<td class=dblue>" . $MODULESELECT->out() . "</td>\r\n\t\t\t\t\t\t</tr></form></table>";
// ----- add select box einbauen
if ($this->function == "add" && $this->slice_id == $I_ID) {
$slice_content = $this->addSlice($I_ID, $module_id);
} else {
$slice_content .= $amodule;
}
// ----- edit / delete
if ($REX_USER->isValueOf("rights", "module[" . $RE_MODUL_ID[$I_ID] . "]") || $REX_USER->isValueOf("rights", "admin[]") || $REX_USER->isValueOf("rights", "dev[]")) {
// hat rechte zum edit und delete
$mne = "\r\n\t\t\t\t\t\t\t\t<a name=slice{$RE_CONTS[$I_ID]}></a>\r\n\t\t\t\t\t\t\t\t<table width=100% cellspacing=0 cellpadding=5 border=0>\r\n\t\t\t\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t\t\t<td class=blue width=380><b>{$RE_MODUL_NAME[$I_ID]}</b></td>\r\n\t\t\t\t\t\t\t\t<td class=llblue align=center><a href=index.php?page=content&article_id={$this->article_id}&mode=edit&slice_id={$RE_CONTS[$I_ID]}&function=edit&clang=" . $this->clang . "&ctype=" . $this->ctype . "#slice{$RE_CONTS[$I_ID]} class=green12b>" . $I18N->msg('edit') . "</a></td>\r\n\t\t\t\t\t\t\t\t<td class=llblue align=center><a href=index.php?page=content&article_id={$this->article_id}&mode=edit&slice_id={$RE_CONTS[$I_ID]}&function=delete&clang=" . $this->clang . "&ctype=" . $this->ctype . "&save=1#slice{$RE_CONTS[$I_ID]} class=red12b onclick='return confirm(\"" . $I18N->msg('delete') . " ?\")'>" . $I18N->msg('delete') . "</a></td>";
if ($REX_USER->isValueOf("rights", "moveslice[]")) {
$mne .= "<td class=llblue><a href=index.php?page=content&article_id={$this->article_id}&mode=edit&slice_id={$RE_CONTS[$I_ID]}&function=moveup&clang=" . $this->clang . "&ctype=" . $this->ctype . " class=green12b><img src=pics/file_up.gif width=16 height=16 border=0 hspace=5></a><a href=index.php?page=content&article_id={$this->article_id}&mode=edit&slice_id={$RE_CONTS[$I_ID]}&function=movedown&clang=" . $this->clang . "&ctype=" . $this->ctype . " class=green12b><img src=pics/file_down.gif width=16 height=16 border=0></a></td>";
}
$mne .= "</tr></table>";
$slice_content .= $mne . $tbl_head;
if ($this->function == "edit" && $this->slice_id == $RE_CONTS[$I_ID]) {
$slice_content .= $this->editSlice($RE_CONTS[$I_ID], $RE_MODUL_IN[$I_ID]);
} else {
$slice_content .= $RE_MODUL_OUT[$I_ID];
}
$slice_content .= $tbl_bott;
$slice_content = $this->sliceIn($slice_content);
} else {
// hat keine rechte an diesem modul
$mne = "\r\n\t\t\t\t\t\t\t\t<table width=100% cellspacing=0 cellpadding=5 border=0>\r\n\t\t\t\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t\t\t<td class=blue><b>{$RE_MODUL_NAME[$I_ID]}</b> | <b>" . $I18N->msg('no_editing_rights') . "</b></td>\r\n\t\t\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t\t\t\t</table>";
$slice_content .= $mne . $tbl_head . $RE_MODUL_OUT[$I_ID] . $tbl_bott;
$slice_content = $this->sliceIn($slice_content);
}
} else {
// wenn mode nicht edit
$slice_content .= $RE_MODUL_OUT[$I_ID];
$slice_content = $this->sliceIn($slice_content);
}
// --------------- ENDE EINZELNER SLICE
// ---------- slice in ausgabe speichern wenn ctype richtig
//.........这里部分代码省略.........
示例9: getArticle
function getArticle($curctype = -1)
{
global $module_id, $FORM, $REX_USER, $REX, $REX_SESSION, $REX_ACTION, $I18N;
// ctype var festlegung komischer umweg
$a = $this->ctype_var;
${$a} = $curctype;
$sliceLimit = '';
if ($this->getSlice) {
//$REX['GG'] = 0;
$sliceLimit = " and " . $REX['TABLE_PREFIX'] . "article_slice.id = '" . $this->getSlice . "' ";
}
// ----- start: article caching
ob_start();
if ($REX['GG'] && !$this->getSlice) {
if ($this->article_id != 0) {
$this->contents = "";
$filename = $REX['INCLUDE_PATH'] . "/generated/articles/" . $this->article_id . "." . $this->clang . ".content";
if ($fd = @fopen($filename, "r")) {
$this->contents = fread($fd, filesize($filename));
fclose($fd);
eval($this->contents);
}
}
} else {
if ($this->article_id != 0) {
// ---------- alle teile/slices eines artikels auswaehlen
$sql = "select " . $REX['TABLE_PREFIX'] . "modultyp.id, " . $REX['TABLE_PREFIX'] . "modultyp.name, " . $REX['TABLE_PREFIX'] . "modultyp.ausgabe, " . $REX['TABLE_PREFIX'] . "modultyp.eingabe, " . $REX['TABLE_PREFIX'] . "modultyp.php_enable, " . $REX['TABLE_PREFIX'] . "modultyp.html_enable, " . $REX['TABLE_PREFIX'] . "article_slice.*, " . $REX['TABLE_PREFIX'] . "article.re_id\r\n from\r\n " . $REX['TABLE_PREFIX'] . "article_slice\r\n left join " . $REX['TABLE_PREFIX'] . "modultyp on " . $REX['TABLE_PREFIX'] . "article_slice.modultyp_id=" . $REX['TABLE_PREFIX'] . "modultyp.id\r\n left join " . $REX['TABLE_PREFIX'] . "article on " . $REX['TABLE_PREFIX'] . "article_slice.article_id=" . $REX['TABLE_PREFIX'] . "article.id\r\n where\r\n " . $REX['TABLE_PREFIX'] . "article_slice.article_id='" . $this->article_id . "' and\r\n " . $REX['TABLE_PREFIX'] . "article_slice.clang='" . $this->clang . "' and\r\n " . $REX['TABLE_PREFIX'] . "article.clang='" . $this->clang . "'";
$sql .= $sliceLimit;
$sql .= "order by\r\n " . $REX['TABLE_PREFIX'] . "article_slice.re_article_slice_id";
//print $sql;
$this->CONT = new sql();
$this->CONT->setQuery($sql);
// ---------- SLICE IDS/MODUL SETZEN - speichern der daten
for ($i = 0; $i < $this->CONT->getRows(); $i++) {
$RE_CONTS[$this->CONT->getValue("re_article_slice_id")] = $this->CONT->getValue($REX['TABLE_PREFIX'] . "article_slice.id");
$RE_CONTS_CTYPE[$this->CONT->getValue("re_article_slice_id")] = $this->CONT->getValue($REX['TABLE_PREFIX'] . "article_slice.ctype");
$RE_MODUL_OUT[$this->CONT->getValue("re_article_slice_id")] = $this->CONT->getValue($REX['TABLE_PREFIX'] . "modultyp.ausgabe");
$RE_MODUL_IN[$this->CONT->getValue("re_article_slice_id")] = $this->CONT->getValue($REX['TABLE_PREFIX'] . "modultyp.eingabe");
$RE_MODUL_ID[$this->CONT->getValue("re_article_slice_id")] = $this->CONT->getValue($REX['TABLE_PREFIX'] . "modultyp.id");
$RE_MODUL_NAME[$this->CONT->getValue("re_article_slice_id")] = $this->CONT->getValue($REX['TABLE_PREFIX'] . "modultyp.name");
$RE_C[$this->CONT->getValue("re_article_slice_id")] = $i;
$this->CONT->nextValue();
}
// ---------- moduleselect: nur module nehmen auf die der user rechte hat
if ($this->mode == "edit") {
$MODULE = new sql();
$MODULE->setQuery("select * from " . $REX['TABLE_PREFIX'] . "modultyp order by name");
$MODULESELECT = new select();
$MODULESELECT->set_name("module_id");
$MODULESELECT->set_size(1);
$MODULESELECT->set_style("width:100%;");
$MODULESELECT->set_selectextra("onchange='this.form.submit();'");
$MODULESELECT->add_option("---------------------------- " . $I18N->msg("add_block"), '');
for ($i = 0; $i < $MODULE->getRows(); $i++) {
if ($REX_USER->isValueOf("rights", "module[" . $MODULE->getValue("id") . "]") || $REX_USER->isValueOf("rights", "admin[]")) {
$MODULESELECT->add_option($MODULE->getValue("name"), $MODULE->getValue("id"));
}
$MODULE->next();
}
}
// ---------- SLICE IDS SORTIEREN UND AUSGEBEN
$I_ID = 0;
$PRE_ID = 0;
$LCTSL_ID = 0;
$this->article_content = "";
$this->CONT->resetCounter();
$tbl_head = "<table width=100% cellspacing=0 cellpadding=5 border=0><tr><td class=lblue>";
$tbl_bott = "</td></tr></table>";
for ($i = 0; $i < $this->CONT->getRows(); $i++) {
// ----- ctype unterscheidung
if ($i == 0 && $this->mode != "edit") {
$this->article_content = "<?php if (\$" . $this->ctype_var . " == '" . $RE_CONTS_CTYPE[$I_ID] . "' || (\$" . $this->ctype_var . " == '-1')) { ?>";
}
// ------------- EINZELNER SLICE - AUSGABE
$this->CONT->counter = $RE_C[$I_ID];
$slice_content = "";
$SLICE_SHOW = TRUE;
if ($this->mode == "edit") {
$this->ViewSliceId = $RE_CONTS[$I_ID];
$amodule = "\r\n <table cellspacing=0 cellpadding=5 border=0 width=100%>\r\n <form action=index.php";
if ($this->setanker) {
$amodule .= "#addslice";
}
$amodule .= " method=get>\r\n <input type=hidden name=article_id value={$this->article_id}>\r\n <input type=hidden name=page value=content>\r\n <input type=hidden name=mode value={$this->mode}>\r\n <input type=hidden name=slice_id value={$I_ID}>\r\n <input type=hidden name=function value=add>\r\n <input type=hidden name=clang value=" . $this->clang . ">\r\n <input type=hidden name=ctype value=" . $this->ctype . ">\r\n <tr>\r\n <td class=dblue>" . $MODULESELECT->out() . "</td>\r\n </tr></form></table>";
// ----- add select box einbauen
if ($this->function == "add" && $this->slice_id == $I_ID) {
$slice_content = $this->addSlice($I_ID, $module_id);
} else {
$slice_content .= $amodule;
}
// ----- edit / delete
if ($REX_USER->isValueOf("rights", "module[" . $RE_MODUL_ID[$I_ID] . "]") || $REX_USER->isValueOf("rights", "admin[]")) {
// hat rechte zum edit und delete
$mne = "\r\n <a name=slice{$RE_CONTS[$I_ID]}></a>\r\n <table width=100% cellspacing=0 cellpadding=5 border=0>\r\n <tr>\r\n <td class=blue width=380><b>{$RE_MODUL_NAME[$I_ID]}</b></td>\r\n <td class=llblue align=center><a href=index.php?page=content&article_id={$this->article_id}&mode=edit&slice_id={$RE_CONTS[$I_ID]}&function=edit&clang=" . $this->clang . "&ctype=" . $this->ctype . "#slice{$RE_CONTS[$I_ID]} class=green12b>" . $I18N->msg('edit') . "</a></td>\r\n <td class=llblue align=center><a href=index.php?page=content&article_id={$this->article_id}&mode=edit&slice_id={$RE_CONTS[$I_ID]}&function=delete&clang=" . $this->clang . "&ctype=" . $this->ctype . "&save=1#slice{$RE_CONTS[$I_ID]} class=red12b onclick='return confirm(\"" . $I18N->msg('delete') . " ?\")'>" . $I18N->msg('delete') . "</a></td>";
if ($REX_USER->isValueOf("rights", "moveSlice[]")) {
$mne .= "<td class=llblue><a href=index.php?page=content&article_id={$this->article_id}&mode=edit&slice_id={$RE_CONTS[$I_ID]}&function=moveup&clang=" . $this->clang . "&ctype=" . $this->ctype . "&upd=" . time() . "#slice{$RE_CONTS[$I_ID]} class=green12b><img src=pics/file_up.gif width=16 height=16 border=0 hspace=5></a><a href=index.php?page=content&article_id={$this->article_id}&mode=edit&slice_id={$RE_CONTS[$I_ID]}&function=movedown&clang=" . $this->clang . "&ctype=" . $this->ctype . "&upd=" . time() . "#slice{$RE_CONTS[$I_ID]} class=green12b><img src=pics/file_down.gif width=16 height=16 border=0></a></td>";
}
$mne .= "</tr></table>";
$slice_content .= $mne . $tbl_head;
if ($this->function == "edit" && $this->slice_id == $RE_CONTS[$I_ID]) {
//.........这里部分代码省略.........
示例10: htmlentities
$sel->set_size(1);
$sel->add_option("1", "1");
$sel->add_option("2", "2");
$sel->add_option("3", "3");
$sel->add_option("4", "4");
$sel->add_option("5", "5");
$sel->add_option("6", "6");
$sel->add_option("7", "7");
$sel->add_option("8", "8");
$sel->add_option("8", "8");
$sel->add_option("9", "9");
$sel->add_option("10", "10");
$sel->add_option("11", "11");
$sel->add_option("12", "12");
$sel->add_option("13", "13");
$sel->set_style("width:40px");
echo "<table class=rex style=table-layout:auto; cellpadding=5 cellspacing=1>\r\n <tr>\r\n\t\t\t<th class=icon><a href=index.php?page=specials&spage=lang&func=addclang#clang>+</a></th>\r\n\t\t\t<th style='width:40px; text-align:center;'>ID</th>\r\n\t\t\t<th width=250>" . $I18N->msg("clang_desc") . "</th>\r\n\t\t\t<th colspan=2>-</th></tr>";
if ($message != "") {
echo "<tr class=warning><td class=icon><img src=pics/warning.gif width=16 height=16></td><td colspan=4>{$message}</td></tr>";
$message = "";
}
if ($func == "addclang") {
$sel->set_selected($clang_id);
echo "<tr><form action=index.php#clang method=post><input type=hidden name=page value=specials><input type=hidden name=spage value=lang><input type=hidden name=func value=addclangsave>";
echo "<td>add</td>";
echo "<td>" . $sel->out() . "</td>";
echo "<td><input type=text size=10 class=inp100 name=clang_name value='" . htmlentities($clang_name) . "'></td>";
echo "<td><input type=submit value=submit></td>";
echo "</form></tr>";
}
reset($REX[CLANG]);
示例11: getimagesize
if ($ffiletype_ii == 1) {
$size = getimagesize($REX[INCLUDE_PATH] . "/../../files/{$fname}");
$fwidth = $size[0];
$fheight = $size[1];
if ($fwidth > 199) {
$rfwidth = 200;
} else {
$rfwidth = $fwidth;
}
}
$cats = new sql();
$cats->setQuery("SELECT * FROM rex_file_category ORDER BY name ASC");
$cats_sel = new select();
$cats_sel->set_name("rex_file_category");
$cats_sel->set_size(1);
$cats_sel->set_style("' class='inp100");
$cats_sel->add_option($I18N->msg('pool_kats_no'), "0");
for ($i = 0; $i < $cats->getRows(); $i++) {
$cats_sel->add_option($cats->getValue("name"), $cats->getValue("id"));
$cats->next();
}
$cats_sel->set_selected($rex_file_category);
if ($msg != "") {
print "<table border=0 cellpadding=3 cellspacing=0 width=100%><tr><td width=20 class=warning><img src=pics/warning.gif width=16 height=16></td><td class=warning>{$msg}</td></tr><tr><td colspan=2></td></tr></table>";
$msg = "";
}
// INPUT FIELD
if ($_SESSION[myarea] == '') {
$opener_link = "<a href=javascript:void(0) onClick=selectMedia('" . $fname . "');>" . $I18N->msg('pool_file_get') . "</a>";
$olinka = "<a href=javascript:void(0) onClick=selectMedia('" . $fname . "');>";
} else {
示例12: select
case 1:
$dbchecked1 = " checked";
break;
case 2:
$dbchecked2 = " checked";
break;
case 3:
$dbchecked3 = " checked";
break;
default:
$dbchecked0 = " checked";
}
// Vorhandene Exporte auslesen
$sel_export = new select();
$sel_export->set_name('import_name');
$sel_export->set_style('width: 300px;');
$sel_export->set_selectextra('onchange="checkInput(\'dbanlegen[3]\')"');
$export_dir = $export_addon_dir . '/files';
$exports_found = false;
if (is_dir($export_dir)) {
if ($handle = opendir($export_dir)) {
$export_archives = array();
$export_sqls = array();
while (($file = readdir($handle)) !== false) {
if ($file == '.' || $file == '..') {
continue;
}
$isSql = substr($file, strlen($file) - 4) == '.sql';
$isArchive = substr($file, strlen($file) - 7) == '.tar.gz';
if ($isSql) {
$export_sqls[] = substr($file, 0, -4);
示例13: sql
$sel_module->multiple(1);
$sel_module->set_style("width:250px; height: 150px;");
$sel_module->set_size(10);
$sel_module->set_name("userperm_module[]");
$sel_module->set_id("userperm_module");
$sqlmodule = new sql();
$sqlmodule->setQuery("select * from " . $REX['TABLE_PREFIX'] . "modultyp order by name");
for ($i = 0; $i < $sqlmodule->getRows(); $i++) {
$name = $sqlmodule->getValue("name");
$sel_module->add_option($name, $sqlmodule->getValue("id"));
$sqlmodule->next();
}
// extrarechte - von den addons übergeben
$sel_extra = new select();
$sel_extra->multiple(1);
$sel_extra->set_style("width:250px; height: 150px;");
$sel_extra->set_size(10);
$sel_extra->set_name("userperm_extra[]");
$sel_extra->set_id("userperm_extra");
if (isset($REX['EXTRAPERM'])) {
for ($i = 0; $i < count($REX['EXTRAPERM']); $i++) {
if ($i == 0) {
reset($REX['EXTRAPERM']);
}
$sel_extra->add_option(current($REX['EXTRAPERM']), current($REX['EXTRAPERM']));
next($REX['EXTRAPERM']);
}
}
// --------------------------------- Title
rex_title($I18N->msg("title_user"), "");
// --------------------------------- FUNCTIONS
示例14: select
$iaction_id = $gma->getValue("rex_module_action.id");
$action_id = $gma->getValue("rex_module_action.action_id");
echo "<tr>\r\n\t\t\t\t\t\t<td class=grey> </td>\r\n\t\t\t\t\t\t<td class=grey>";
echo "<a href=index.php?page=module&subpage=actions&action_id={$action_id}&function=edit>" . $gma->getValue("name") . "</a>";
echo " [";
echo $PREPOST[$gma->getValue("prepost")] . "|";
echo $ASTATUS[$gma->getValue("status")];
echo "] </td>";
echo "<td class=grey><a href=index.php?page=module&modul_id={$modul_id}&function_action=delete&function=edit&iaction_id={$iaction_id}>" . $I18N->msg("action_delete") . "</a></td>";
echo "</tr>";
$gma->next();
}
$gaa_sel = new select();
$gaa_sel->set_name("action_id");
$gaa_sel->set_size(1);
$gaa_sel->set_style("' class='inp100");
for ($i = 0; $i < $gaa->getRows(); $i++) {
$gaa_sel->add_option($gaa->getValue("name") . " [" . $PREPOST[$gaa->getValue("prepost")] . "|" . $ASTATUS[$gaa->getValue("status")] . "]", $gaa->getValue("id"));
$gaa->next();
}
echo "<form action=index.php#action method=post>";
echo "<input type=hidden name=page value=module>";
echo "<input type=hidden name=modul_id value={$modul_id}>";
echo "<input type=hidden name=function value=edit>";
echo "<input type=hidden name=function_action value=add>";
echo "<tr><td colspan=3></td></tr><tr>\r\n\t\t\t\t\t<td class=grey> </td>\r\n\t\t\t\t\t<td class=grey>" . $gaa_sel->out() . "</td>\r\n\t\t\t\t\t<td class=grey><input type=submit value='" . $I18N->msg("action_add") . "'></td>\r\n\t\t\t\t\t</tr>";
echo "</form>";
}
}
echo "</table>";
$OUT = false;
示例15: select
}
$sel_prepost = new select();
$sel_prepost->set_name("prepost");
$sel_prepost->add_option($PREPOST[0], "0");
$sel_prepost->add_option($PREPOST[1], "1");
$sel_prepost->set_size(1);
$sel_prepost->set_style("width:100px;");
$sel_prepost->set_selected($prepost);
$sel_status = new select();
$sel_status->set_name("status[]");
$sel_status->multiple(1);
$sel_status->add_option($ASTATUS[0], "1");
$sel_status->add_option($ASTATUS[1], "2");
$sel_status->add_option($ASTATUS[2], "4");
$sel_status->set_size(3);
$sel_status->set_style("width:100px;");
if ($sadd == 1) {
$sel_status->set_selected(1);
}
if ($sedit == 1) {
$sel_status->set_selected(2);
}
if ($sdelete == 1) {
$sel_status->set_selected(4);
}
if (!isset($action_id)) {
$action_id = '';
}
if (!isset($mname)) {
$mname = '';
}