本文整理汇总了PHP中select类的典型用法代码示例。如果您正苦于以下问题:PHP select类的具体用法?PHP select怎么用?PHP select使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了select类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: initialize
/**
* Initialize the products form
*/
public function initialize($entity = null, $options = array())
{
$f = new text("url_base");
$f->setLabel('URL BASE');
$f->setAttribute('class', 'form-control');
$this->add($f);
$f = new select("ativo", array('1' => 'Sim', '0' => 'Não'));
$f->setAttribute('class', 'form-control');
$this->add($f);
$f = new select("manutencao", array('1' => 'Sim', '0' => 'Não'));
$f->setAttribute('class', 'form-control');
$this->add($f);
$f = new select("orcamento", array('1' => 'Sim', '0' => 'Não'));
$f->setAttribute('class', 'form-control');
$this->add($f);
$f = new select("adicionar_carrinho", array('1' => 'Sim', '0' => 'Não'));
$f->setLabel('Adicionar Carrinho');
$f->setAttribute('class', 'form-control');
$this->add($f);
$f = new text("plano");
$f->setAttribute('class', 'form-control');
$this->add($f);
$f = new numeric("limite_produtos");
$f->setLabel('Limite de Produtos');
$f->setAttribute('class', 'form-control');
$this->add($f);
$f = new select("certificado", array('certising' => 'Certising', 'comodo' => 'Comodo', 'norton' => 'Norton', 'rapidssl' => 'Rapid SSL', 'site_blindado' => 'Site Blindado'));
$f->setAttribute('class', 'form-control');
$this->add($f);
}
开发者ID:denners777,项目名称:phalcon_ecommerce,代码行数:33,代码来源:LojaGeralConfigForm.php
示例2: fetchAll
public function fetchAll()
{
$select = new select();
$select->from('categories');
$select->join('master_categories', 'master_categories.id = categories.master_category', array('master_category_name' => 'name'));
$resultSet = $this->tableGateway->selectWith($select);
$resultSet->buffer();
return $resultSet ? $resultSet : false;
}
开发者ID:kalelc,项目名称:inventory,代码行数:9,代码来源:CategoryTable.php
示例3: getUtilisateurByID
public function getUtilisateurByID($clientid)
{
$select = new select();
$select->from('user');
$select->where(array('user_id' => $clientid));
$rowset = $this->tableGateway->selectwith($select);
$rowset->buffer();
return $rowset;
}
开发者ID:JohannesGirard,项目名称:WebCashRegister-zf2,代码行数:9,代码来源:UserTable.php
示例4: all
public function all($option = "")
{
global $database;
$option["column_array"] = ["*"];
$select = new select();
$sql = $select->build_select_all_sql(self::get_table(), $option);
$row = $database->fetch($sql);
return $row;
}
开发者ID:hscale,项目名称:BlastPad,代码行数:9,代码来源:model_class.php
示例5: initialize
public function initialize($entity = null, $option = array())
{
if (!isset($option['edit'])) {
$element = new Text("id");
$this->add($element->setLabel("id"));
} else {
$this->add(new Hidden("id"));
}
$name = new Text("name");
$name->addValidator(new PresenceOf(array('message' => 'The name is required')));
$name->setLabel("分类名称");
$this->add($name);
$isParent = new select('isParent', array("0" => "否", '1' => '是'), array("value" => 1));
$isParent->setLabel("是");
$this->add($isParent);
$parentId = new select("parentId", Category::find("isParent=1 and status=1"), array("using" => array("id", "name"), 'useEmpty' => true, 'emptyText' => '...', 'emptyValue' => '0', "value" => 0));
$parentId->setlabel("父类名称:");
$this->add($parentId);
}
开发者ID:sayi21cn,项目名称:haitao,代码行数:19,代码来源:CategoryForm.php
示例6: init
static function init()
{
self::$selects["default_style"] = array("{t}Default theme{/t}", select::themes());
self::$selects["timezone"] = array("{t}Time zone{/t}, {t}current time{/t}: " . sys_date("{t}g:i a{/t}"), select::timezones(true));
self::$selects["lang"] = array("{t}Default language{/t}", select::languages());
$modules = select::modules_all();
asort($modules);
self::$multi_selects["disabled_modules"] = array("{t}Disabled modules{/t}", $modules);
if (empty($_REQUEST["setup_auth_ldap_groups"])) {
$_POST["setup_auth_ldap_groups"] = 0;
$_REQUEST["setup_auth_ldap_groups"] = 0;
}
}
开发者ID:drognisep,项目名称:Simple-Groupware,代码行数:13,代码来源:sysconfig.php
示例7: command
public static function command($msg, $user)
{
$returnmsg = "";
$msg = substr($msg, 1);
$command = explode(' ', $msg);
commands::logm("command:" . $command[0] . "|rechte [" . $user->rights . "]\n");
switch ($command[0]) {
case "invite":
break;
case "join":
break;
case "leave":
break;
case "rights":
break;
case "group":
break;
case "eval":
if ($user->rights >= 10000000) {
global $sockets, $users, $groups, $server;
ob_start();
eval($command[1] . ";");
$result = ob_get_clean();
$returnmsg = $result;
} else {
$returnmsg = "Insufficient permissions!";
}
break;
case "kick":
break;
case "ban":
break;
case "shout":
if ($user->rights > 100) {
} else {
$returnmsg = "Insufficient permissions!";
}
break;
case "w":
if (select::byname($command[1])) {
$returnmsg = "You whispert to:" . $command[1] . " " . $msg;
} else {
$returnmsg = "User \"" . $command[1] . "\" not found";
}
break;
default:
$returnmsg = "Command not found";
break;
}
return $returnmsg;
}
开发者ID:Kawaeike,项目名称:LocalChat,代码行数:51,代码来源:commands.php
示例8: initialize
/**
* Initialize the products form
*/
public function initialize($entity = null, $options = array())
{
$f = new select("template_nome", array('7store' => '7store', 'Bewear' => 'Bewear', 'Bohase' => 'Bohase', 'Classic' => 'Classic', 'Everything' => 'Everything', 'Hosoren' => 'Hosoren', 'Micra' => 'Micra', 'ShopMe' => 'ShopMe', 'Smile' => 'Smile', 'Unicase' => 'Unicase'));
$f->setLabel('Template Nome');
$f->setAttribute('class', 'form-control');
$this->add($f);
$f = new text("template_variacao");
$f->setLabel('Template Variação');
$f->setAttribute('class', 'form-control');
$this->add($f);
$f = new text("imagem_size");
$f->setLabel('Imagem Size');
$f->setAttribute('class', 'form-control');
$this->add($f);
$f = new text("thumbnail_size");
$f->setLabel('Thumbnail Size');
$f->setAttribute('class', 'form-control');
$this->add($f);
$f = new text("paginacao_tipo");
$f->setLabel('Paginaçao Tipo');
$f->setAttribute('class', 'form-control');
$this->add($f);
}
开发者ID:denners777,项目名称:phalcon_ecommerce,代码行数:26,代码来源:LojaLayoutForm.php
示例9: getBySpecification
public function getBySpecification($specification)
{
$select = new select();
$select->from('measures');
$select->join('measures_types', 'measures_types.id = measures.measure_type', array('mt_name' => 'name'), $select::JOIN_LEFT);
$select->join('specifications', 'specifications.id = measures.specification', array('s_name' => 'name'));
$select->where(array($this->tableGateway->getTable() . '.specification' => $specification));
$resultSet = $this->tableGateway->selectWith($select);
return $resultSet ? $resultSet : false;
}
开发者ID:kalelc,项目名称:inventory,代码行数:10,代码来源:MeasureTable.php
示例10: select
static function select($path, $fields, $where, $order, $limit, $vars, $mfolder)
{
$rows = array();
$modules = select::modules();
asort($modules);
foreach ($modules as $module => $name) {
if ($name[0] == " ") {
continue;
}
$file = sys_find_module($module);
$row = array("id" => $file, "name" => $name, "modulename" => $module, "created" => @filectime($file), "lastmodified" => @filemtime($file), "lastmodifiedby" => "", "searchcontent" => $file, "filename" => $file, "filemtime" => @filemtime($file), "filectime" => @filectime($file), "filesize" => @filesize($file), "filecontent" => "");
if (sys_select_where($row, $where, $vars)) {
$rows[$file] = $row;
}
}
return sys_select($rows, $order, $limit, $fields);
}
开发者ID:drognisep,项目名称:Simple-Groupware,代码行数:17,代码来源:modules.php
示例11: select
$msg .= " | ";
$subpage = "";
}
} else {
$msg .= $I18N->msg('pool_file_not_found');
$subpage = "";
}
$msg .= "<br>";
}
} else {
$msg = $I18N->msg('pool_selectedmedia_error');
}
}
// *************************************** SUBPAGE: "" -> MEDIEN ANZEIGEN
if (!isset($subpage) or $subpage == '') {
$cats_sel = new select();
$cats_sel->set_style("width:150px;");
$cats_sel->set_size(1);
$cats_sel->set_name("rex_file_category");
$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);
}
}
$cats_sel->set_selected($rex_file_category);
echo "<table width=100% cellpadding=5 cellspacing=1 border=0 ><tr><td class=grey><b class=head>" . $I18N->msg('pool_file_list') . "</b></td></tr><tr><td></td></tr></table>";
echo $cat_out;
print "<table class=rex border=0 cellpadding=5 cellspacing=1 style='width:100%'>\n";
开发者ID:BackupTheBerlios,项目名称:redaxo-svn,代码行数:31,代码来源:medienpool.inc.php
示例12: foreach
$myAdmin->delete_notification($deleteDone, $result);
$myAdmin->addLogs($myAdmin->pageCurrent, "DEL", $idDel, $result);
}
// Fin suppression
// DUPLICATION /////////////////////////////////////// ????
if ($__POST["actionInList"] == "dupliquer" && (int) $__POST["actionListId"]) {
$newID = $PDO->duplication($myTable, $__POST["actionListId"], "titre", "");
}
// Fin Duplication
// FILTRES /////////////////////////////////////// ????
if (count($datasArticle["filtre"]) > 0) {
include DOS_INCPAGES_ADMIN . "list-prepareFiltres.php";
foreach ($datasArticle["filtre"] as $f => $filtre) {
if ($filtre["type"] == "select") {
reset($filtre["items"]);
$newfield = new select();
$newfield->field = "F__filtre_" . $filtre["field"];
$newfield->label = $filtre["label"];
$newfield->widthLabel = 1;
$newfield->multiLang = false;
$newfield->javascript = "onChange='submitFiltres()'";
$newfield->allItems = true;
$newfield->items = $filtre["items"];
$newfield->value = ${$newfield->field};
$datasArticle["filtre"][$f]["HTML_Filtre"] = $newfield->add();
}
if ($filtre["type"] == "date") {
$newfield = new date();
$newfield->field = "F__filtre_" . $filtre["field"];
$newfield->label = $filtre["label"];
$newfield->widthLabel = 1;
开发者ID:wedesign-pf,项目名称:Tit,代码行数:31,代码来源:article.php
示例13: sql
$gma = new sql();
$gma->setQuery("select * from rex_module_action,rex_action where rex_module_action.action_id=rex_action.id and rex_module_action.module_id='{$modul_id}'");
for ($i = 0; $i < $gma->getRows(); $i++) {
$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>";
}
开发者ID:BackupTheBerlios,项目名称:redaxo-svn,代码行数:31,代码来源:module.modules.inc.php
示例14: select
if ($REX_USER->isValueOf("rights", "admin[]") || $REX_USER->isValueOf("rights", "moveArticle[]") || $REX_USER->isValueOf("rights", "copyArticle[]") || $REX_USER->isValueOf("rights", "copyContent[]") && count($REX['CLANG']) > 1) {
echo "<table border=0 cellpadding=5 cellspacing=1 width=100%>\n <tr>\n <td colspan=3>" . $I18N->msg("other_functions") . "</td>\n </tr>";
// --------------------------------------------------- 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
开发者ID:BackupTheBerlios,项目名称:redaxo,代码行数:31,代码来源:content.inc.php
示例15: cargar_combo_hora
function cargar_combo_hora($combo, $hora = '')
{
$xres = new xajaxResponse();
require_once "../include/select.php";
ob_start();
?>
<select id='<?php
echo $combo;
?>
1' name='<?php
echo $combo;
?>
1' class="select"></select>
<select id='<?php
echo $combo;
?>
2' name='<?php
echo $combo;
?>
2' class="select"></select>
<select id='<?php
echo $combo;
?>
3' name='<?php
echo $combo;
?>
3' class="select"></select>
<?php
$xres->addAssign($combo, "innerHTML", ob_get_clean());
$hora = explode(':', $hora);
$h = $hora[0];
$m = $hora[1];
$s = 'AM';
if ($h > 12) {
$h -= 12;
$s = 'PM';
}
// Creando Objeto Select Hora
$sel = new select();
//Agregando Opciones
$sel->agregarOpcion('1', '01');
$sel->agregarOpcion('2', '02');
$sel->agregarOpcion('3', '03');
$sel->agregarOpcion('4', '04');
$sel->agregarOpcion('5', '05');
$sel->agregarOpcion('6', '06');
$sel->agregarOpcion('7', '07');
$sel->agregarOpcion('8', '08');
$sel->agregarOpcion('9', '09');
$sel->agregarOpcion('10', '10');
$sel->agregarOpcion('11', '11');
$sel->agregarOpcion('12', '12');
// Opción seleccionada
if ($h != '') {
$sel->seleccionarValue($h);
}
// Cargo los datos en el combo
$xres->addScript($sel->getJavaScript("{$combo}" . "1"));
// Creando Objeto Select Minutos
$sel = new select();
//Agregando Opciones
$sel->agregarOpcion('0', '00');
$sel->agregarOpcion('5', '05');
$sel->agregarOpcion('10', '10');
$sel->agregarOpcion('15', '15');
$sel->agregarOpcion('20', '20');
$sel->agregarOpcion('25', '25');
$sel->agregarOpcion('30', '30');
$sel->agregarOpcion('35', '35');
$sel->agregarOpcion('40', '40');
$sel->agregarOpcion('45', '45');
$sel->agregarOpcion('50', '50');
$sel->agregarOpcion('55', '55');
// Opción seleccionada
if ($m != '') {
$sel->seleccionarValue($m);
}
// Cargo los datos en el combo
$xres->addScript($sel->getJavaScript("{$combo}" . "2"));
// Creando Objeto Select AM/PM
$sel = new select();
//Agregando Opciones
$sel->agregarOpcion('AM', 'AM');
$sel->agregarOpcion('PM', 'PM');
if ($s != '') {
$sel->seleccionarValue($s);
}
// Cargo los datos en el combo
$xres->addScript($sel->getJavaScript("{$combo}" . "3"));
return utf8_encode($xres->getXML());
}
开发者ID:johnfelipe,项目名称:orfeo,代码行数:91,代码来源:combos_xajax.php
示例16: select
}
$newfield = new select();
$newfield->field = "F__mois";
$newfield->label = " " . $datas_lang["mois"];
$newfield->widthLabel = 0;
$newfield->widthField = 0;
$newfield->items = $listMois;
$newfield->value = ${$newfield->field};
$newfield->add();
$listAnnees = array();
$listAnnees["0000"] = "0000";
$resultx = $PDO->free_requete("SELECT aa FROM " . $myTable . " GROUP BY aa");
foreach ($resultx as $rowx) {
$listAnnees[$rowx->aa] = $rowx->aa;
}
$newfield = new select();
$newfield->field = "F__annee";
$newfield->label = " " . $datas_lang["annee"];
$newfield->widthLabel = 0;
$newfield->widthField = 0;
$newfield->items = $listAnnees;
$newfield->value = ${$newfield->field};
$newfield->add();
// FIN FILTRES //////////////////////////////////////////
//for($i=0;$i<=101;$i++) {
// $lg = array_rand($myAdmin->LIST_LANG_DATAS, 1);
// $e = array_rand($listEmplacements, 1);
// $c = array_rand($listCampagnes, 1);
// $b = rand(1, 5);
// $aa = rand(2014, 2015);
// $mm = rand(1, 12);
开发者ID:wedesign-pf,项目名称:code-g,代码行数:31,代码来源:statistiques.php
示例17: htmlspecialchars
if ($REX_USER->isValueOf("rights", "advancedMode[]")) {
$echo .= "<td class=grey align=center>{$i_category_id}</td>";
}
$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[]")) {
开发者ID:BackupTheBerlios,项目名称:redaxo-svn,代码行数:31,代码来源:structure.inc.php
示例18: htmlspecialchars
require_once $ab_module['path'] . 'classes/addressbook.class.inc';
}
if ($todo['res_user_id'] > 0 && ($user = $GO_USERS->get_user($todo['res_user_id']))) {
$middle_name = $user['middle_name'] == '' ? '' : $user['middle_name'] . ' ';
$user_name = htmlspecialchars($user['last_name'] . ' ' . $middle_name . $user['first_name']);
} else {
$user_name = isset($_REQUEST['user_name']) ? htmlspecialchars(smartstrip($_REQUEST['user_name'])) : '';
}
$select = new select('user', 'todo_form', 'res_user_id', $todo['res_user_id']);
echo '<tr><td>';
$select->print_link($cal_responsible);
echo ':</td><td>';
$select->print_field();
echo '</td></tr>';
if ($ab_module) {
$select = new select('contact', 'todo_form', 'contact_id', $todo['contact_id']);
echo '<tr><td>';
$select->print_link($sc_client);
echo ':</td><td>';
$select->print_field();
echo '</td></tr>';
} else {
echo '<input type="hidden" value="0" name="contact_id" />';
}
echo '<tr><td>' . $sc_location . ':</td>' . '<td><input type="text" class="textbox" style="width: 300px;"' . 'name="location" value="' . htmlspecialchars($todo['location']) . '" /></td></tr>' . '<tr><td valign="top">' . $sc_description . ': </td><td>' . '<textarea class="textbox" name="description" cols="60" rows="4">' . htmlspecialchars($todo['description']) . '</textarea></td></tr>' . '<tr><td colspan="2"> </td></tr>';
echo '<tr><td>' . $cal_priority . ':</td><td>';
$dropbox = new dropbox();
$dropbox->add_value('0', $cal_priority_values[0]);
$dropbox->add_value('1', $cal_priority_values[1]);
$dropbox->add_value('2', $cal_priority_values[2]);
$dropbox->print_dropbox('priority', $todo['priority']);
开发者ID:BackupTheBerlios,项目名称:hpt-obm-svn,代码行数:31,代码来源:todo.php
示例19: sql
$echo .= "\n\t <td class=grey valign=middle width=20>{$cat_pos}</td>\n\t ";
}
} else {
$echo .= "\n\t \t<td class=grey valign=middle width=20>{$cat_pos}</td>\n\t ";
}
$echo .= "\n\t\t\t\t<td class=grey>{$edit_txt}</td>\n\t\t\t\t<td class=grey>{$kat_status}</td>\n\t\t\t</tr>";
}
$KAT->next();
}
echo $echo;
echo "</table>";
// --------------------------------------------- article list
if ($category_id > -1) {
$TEMPLATES = new sql();
$TEMPLATES->setQuery("select * from rex_template");
$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");
echo "\t<br><table border=0 cellpadding=5 cellspacing=1 width=770>\n\t\t<tr>\n\t\t\t<th width=30>";
if ($STRUCTURE_PERM) {
echo "<a href=index.php?page=structure&category_id={$category_id}&function=add_art><img src=pics/document_plus.gif width=16 height=16 border=0 alt=\"" . $I18N->msg("article_add") . "\"></a>";
开发者ID:BackupTheBerlios,项目名称:redaxo,代码行数:31,代码来源:structure.inc.php
示例20: 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>";
// &
|
请发表评论