当前位置: 首页>>代码示例>>PHP>>正文


PHP rex_sql::next方法代码示例

本文整理汇总了PHP中rex_sql::next方法的典型用法代码示例。如果您正苦于以下问题:PHP rex_sql::next方法的具体用法?PHP rex_sql::next怎么用?PHP rex_sql::next使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在rex_sql的用法示例。


在下文中一共展示了rex_sql::next方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: __construct

 /**
  * Konstruktor. Stellt die Daten der Kategorie aus der Datenbank zusammen.
  * @param int $kategorie_id Kategorie ID.
  * @param int $clang_id Redaxo SprachID.
  * @param string $table_prefix Redaxo Tabellen Praefix ($REX['TABLE_PREFIX'])
  */
 public function __construct($kategorie_id, $clang_id, $table_prefix = "rex_")
 {
     $this->table_prefix = $table_prefix;
     // Sprachfallback
     $query_prove = "SELECT * FROM " . $this->table_prefix . "d2u_stellenmarkt_kategorien_lang AS lang " . "WHERE kategorie_id = " . $kategorie_id . " " . "ORDER BY clang_id DESC";
     $result_prove = new rex_sql();
     $result_prove->setQuery($query_prove);
     $num_rows_prove = $result_prove->getRows();
     $is_lang_available = false;
     $fallback_lang_id = 0;
     for ($i = 0; $i < $num_rows_prove; $i++) {
         if ($result_prove->getValue("lang.clang_id") == $clang_id) {
             $is_lang_available = true;
         } else {
             $fallback_lang_id = $result_prove->getValue("lang.clang_id");
         }
         $result_prove->next();
     }
     $sql_clang_id = $clang_id;
     if ($is_lang_available == false) {
         $sql_clang_id = $fallback_lang_id;
     }
     $query = "SELECT * FROM " . $this->table_prefix . "d2u_stellenmarkt_kategorien AS kategorien " . "LEFT JOIN " . $this->table_prefix . "d2u_stellenmarkt_kategorien_lang AS lang " . "ON kategorien.kategorie_id = lang.kategorie_id " . "WHERE kategorien.kategorie_id = " . $kategorie_id . " " . "AND (clang_id = " . $sql_clang_id . " OR clang_id IS NULL) " . "LIMIT 0, 1";
     $result = new rex_sql();
     $result->setQuery($query);
     $num_rows = $result->getRows();
     if ($num_rows > 0) {
         $this->kategorie_id = $result->getValue("kategorie_id");
         if ($result->getValue("clang_id") != "") {
             $this->clang_id = $result->getValue("clang_id");
         }
         $this->interne_bezeichnung = $result->getValue("interne_bezeichnung");
         $this->name = $result->getValue("name");
     }
 }
开发者ID:TobiasKrais,项目名称:d2u_stellenmarkt,代码行数:41,代码来源:class.stellenkategorie.inc.php

示例2: rex_a62_metainfo_cleanup

/**
 * Alle Metafelder löschen, nicht das nach einem Import in der Parameter Tabelle
 * noch Datensätze zu Feldern stehen, welche nicht als Spalten in der
 * rex_article angelegt wurden!
 */
function rex_a62_metainfo_cleanup($params)
{
    global $REX;
    // Cleanup nur durchführen, wenn auch die rex_article Tabelle neu angelegt wird
    if (isset($params['force']) && $params['force'] != true && strpos($params['content'], 'CREATE TABLE `' . $REX['TABLE_PREFIX'] . 'article`') === false && strpos($params['content'], 'CREATE TABLE ' . $REX['TABLE_PREFIX'] . 'article') === false) {
        return;
    }
    require_once $REX['INCLUDE_PATH'] . '/addons/metainfo/classes/class.rex_table_manager.inc.php';
    $sql = new rex_sql();
    $sql->setQuery('SELECT name FROM ' . $REX['TABLE_PREFIX'] . '62_params');
    for ($i = 0; $i < $sql->getRows(); $i++) {
        if (substr($sql->getValue('name'), 0, 4) == 'med_') {
            $tableManager = new rex_a62_tableManager($REX['TABLE_PREFIX'] . 'file');
        } else {
            $tableManager = new rex_a62_tableManager($REX['TABLE_PREFIX'] . 'article');
        }
        $tableManager->deleteColumn($sql->getValue('name'));
        $sql->next();
    }
    // evtl reste aufräumen
    $tablePrefixes = array('article' => array('art_', 'cat_'), 'file' => array('med_'));
    foreach ($tablePrefixes as $table => $prefixes) {
        $table = $REX['TABLE_PREFIX'] . $table;
        $tableManager = new rex_a62_tableManager($table);
        foreach (rex_sql::showColumns($table) as $column) {
            $column = $column['name'];
            if (in_array(substr($column, 0, 4), $prefixes)) {
                $tableManager->deleteColumn($column);
            }
        }
    }
    $sql = new rex_sql();
    $sql->setQuery('DELETE FROM ' . $REX['TABLE_PREFIX'] . '62_params');
    rex_generateAll();
}
开发者ID:BackupTheBerlios,项目名称:redaxo,代码行数:40,代码来源:extension_cleanup.inc.php

示例3: setContent

 /**
  * SET CONTENT OF ROBOTS.TXT
  *
  * @return  (string) robots.txt
  */
 public function setContent($content)
 {
     global $REX;
     $out = '';
     $langs = array_keys($REX['CLANG']);
     // get clang ids
     $defaultRobotsTxt = 'User-agent: *' . "\r\n" . 'Disallow:';
     if (!$REX['ADDON']['seo42']['settings']['no_robots_txt_auto_disallow']) {
         foreach ($langs as $lang) {
             $query = "SELECT id FROM " . $REX['TABLE_PREFIX'] . "article WHERE seo_noindex = '1' AND status = 1 AND clang = " . $lang;
             $sql = new rex_sql();
             $sql->setQuery($query);
             for ($i = 1; $i <= $sql->getRows(); $i++) {
                 $out .= "Disallow: /" . seo42::getTrimmedUrl($sql->getValue('id'), $lang) . "\r\n";
                 $sql->next();
             }
         }
     }
     if ($out != '') {
         $out = "User-agent: *" . "\r\n" . $out . "\r\n";
     }
     if ($out == '' && $content == '') {
         $this->robots_txt = $defaultRobotsTxt;
     } else {
         $this->robots_txt = $out . $content;
     }
 }
开发者ID:omphteliba,项目名称:seo42,代码行数:32,代码来源:class.seo42_robots.inc.php

示例4: elseif

 function rex_copyRevisionContent($article_id, $clang, $from_revision_id, $to_revision_id, $from_re_sliceid = 0, $to_revision_delete = FALSE)
 {
     global $REX;
     if ($to_revision_delete) {
         $dc = new rex_sql();
         // $dc->debugsql = 1;
         $dc->setQuery('delete from ' . $REX['TABLE_PREFIX'] . 'article_slice where article_id=' . $article_id . ' and clang=' . $clang . ' and revision=' . $to_revision_id);
     }
     if ($from_revision_id == $to_revision_id) {
         return false;
     }
     $gc = new rex_sql();
     // $gc->debugsql = 1;
     $gc->setQuery("select * from " . $REX['TABLE_PREFIX'] . "article_slice where re_article_slice_id='{$from_re_sliceid}' and article_id='{$article_id}' and clang='{$clang}' and revision='{$from_revision_id}'");
     if ($gc->getRows() == 1) {
         // letzt slice_id des ziels holen ..
         $glid = new rex_sql();
         // $glid->debugsql = 1;
         $glid->setQuery("\n\t\t\t\t\tselect \n\t\t\t\t\t\tr1.id, r1.re_article_slice_id\n\t        from \n\t\t\t\t\t\t" . $REX['TABLE_PREFIX'] . "article_slice as r1\n\t\t\t\t\tleft join " . $REX['TABLE_PREFIX'] . "article_slice as r2 on r1.id = r2.re_article_slice_id\n\t        where \n\t\t\t\t\t\tr1.article_id = {$article_id} and r1.clang = {$clang} and \n\t\t\t\t\t\tr2.id is NULL and \n\t\t\t\t\t\tr1.revision='{$to_revision_id}';");
         if ($glid->getRows() == 1) {
             $to_last_slice_id = $glid->getValue("r1.id");
         } else {
             $to_last_slice_id = 0;
         }
         $ins = new rex_sql();
         // $ins->debugsql = 1;
         $ins->setTable($REX['TABLE_PREFIX'] . "article_slice");
         $cols = new rex_sql();
         $cols->setquery("SHOW COLUMNS FROM " . $REX['TABLE_PREFIX'] . "article_slice");
         for ($j = 0; $j < $cols->rows; $j++, $cols->next()) {
             $colname = $cols->getValue("Field");
             if ($colname == "re_article_slice_id") {
                 $value = $to_last_slice_id;
             } elseif ($colname == "revision") {
                 $value = $to_revision_id;
             } elseif ($colname == "createdate") {
                 $value = time();
             } elseif ($colname == "updatedate") {
                 $value = time();
             } elseif ($colname == "createuser") {
                 $value = $REX["USER"]->getValue("login");
             } elseif ($colname == "updateuser") {
                 $value = $REX["USER"]->getValue("login");
             } else {
                 $value = $gc->getValue($colname);
             }
             if ($colname != "id") {
                 $ins->setValue($colname, $ins->escape($value));
             }
         }
         $ins->insert();
         // id holen und als re setzen und weitermachen..
         rex_copyRevisionContent($article_id, $clang, $from_revision_id, $to_revision_id, $gc->getValue("id"));
         return true;
     }
     rex_generateArticle($article_id);
     return true;
 }
开发者ID:BackupTheBerlios,项目名称:redaxo-svn,代码行数:58,代码来源:function_rex_copyrevisioncontent.inc.php

示例5: delFields

 /**
  * delete the metafields
  */
 public static function delFields()
 {
     global $REX;
     $sql = new rex_sql();
     $sql->setQuery('SELECT `name` FROM ' . $REX['TABLE_PREFIX'] . '62_params WHERE `name` LIKE "asd_%"');
     $delFields = array();
     for ($i = 1; $i <= $sql->getRows(); $i++) {
         $delFields[] = a62_delete_field($sql->getValue('name'));
         $sql->next();
     }
     return self::checkErrorMessage($delFields);
 }
开发者ID:Sysix,项目名称:asd_news,代码行数:15,代码来源:rex_asd_metainfo_install.php

示例6: enterObject

    function enterObject(&$email_elements, &$sql_elements, &$warning, &$form_output, $send = 0)
    {
        // ***** SELECT FESTLEGEN
        $SEL = new rex_select();
        $SEL->setName('FORM[' . $this->params["form_name"] . '][el_' . $this->id . '][]');
        $SEL->setId("el_" . $this->id);
        $SEL->setSize(5);
        $SEL->setMultiple(1);
        // ***** SQL - ROHDATEN ZIEHEN
        $sql = $this->elements[5];
        $teams = new rex_sql();
        $teams->debugsql = $this->params["debug"];
        $teams->setQuery($sql);
        for ($t = 0; $t < $teams->getRows(); $t++) {
            $SEL->addOption($teams->getValue($this->elements[7]), $teams->getValue($this->elements[6]));
            $teams->next();
        }
        $wc = "";
        // if (isset($warning["el_" . $this->getId()])) $wc = $warning["el_" . $this->getId()];
        $SEL->setStyle('class="multipleselect ' . $wc . '"');
        // ***** EINGELOGGT ODER NICHT SETZEN
        if ($send == 0) {
            // erster aufruf
            // Daten ziehen
            if ($this->params["main_id"] > 0) {
                $this->value = array();
                $g = new rex_sql();
                $g->debugsql = $this->params["debug"];
                $g->setQuery('select ' . $this->elements[3] . ' from ' . $this->elements[1] . ' where ' . $this->elements[2] . '=' . $this->params["main_id"]);
                $gg = $g->getArray();
                if (is_array($gg)) {
                    foreach ($gg as $g) {
                        $this->value[] = $g[$this->elements[3]];
                    }
                }
            }
        }
        // ***** AUSWAHL SETZEN
        if (is_array($this->value)) {
            foreach ($this->value as $val) {
                $SEL->setSelected($val);
            }
        }
        // ***** AUSGEBEN
        $form_output[] = '
			<p class="formmultipleselect">
				<label class="multipleselect ' . $wc . '" for="el_' . $this->id . '" >' . $this->elements[4] . '</label>
				' . $SEL->get() . '
			</p>';
    }
开发者ID:BackupTheBerlios,项目名称:redaxo-svn,代码行数:50,代码来源:class.xform.select_multiple_sql.inc.php

示例7: getValue

 function getValue($value)
 {
     if (!is_array($value)) {
         $value = array();
         $section =& $this->getSection();
         // Alle vorhanden Werte löschen
         $sql = new rex_sql();
         $sql->setQuery('SELECT `' . $this->foreignField . '` FROM `' . $this->foreignTable . '` WHERE ' . $section->_getWhereString());
         for ($i = 0; $i < $sql->getRows(); $i++) {
             $value[] = $sql->getValue($this->foreignField);
             $sql->next();
         }
     }
     return $value;
 }
开发者ID:BackupTheBerlios,项目名称:redaxo-addons,代码行数:15,代码来源:class.rex_externalMultiValueManager.inc.php

示例8: updateArticleId

 /**
  * update the article id in the url_control sql table
  * @param int $id
  */
 public static function updateArticleId($id)
 {
     global $REX;
     $sql = new rex_sql();
     $sql->setTable($REX['TABLE_PREFIX'] . 'url_control_generate');
     $sql->setWhere('`table` = "' . rex_asd_news_config::getTable() . '"');
     $sql->select('id');
     for ($i = 1; $i <= $sql->getRows(); $i++) {
         $saveSql = new rex_sql();
         $saveSql->setTable($REX['TABLE_PREFIX'] . 'url_control_generate');
         $saveSql->setWhere('`id` = ' . $sql->getValue('id'));
         $saveSql->setValue('article_id', $id);
         $saveSql->update();
         $sql->next();
     }
 }
开发者ID:Sysix,项目名称:asd_news,代码行数:20,代码来源:rex_asd_news_url_control.php

示例9: init

 public static function init()
 {
     global $REX;
     self::$curClang = $REX['CUR_CLANG'];
     $sql = new rex_sql();
     $sql->setQuery('SELECT * FROM ' . $REX['TABLE_PREFIX'] . 'string_table');
     foreach ($REX['CLANG'] as $clangId => $clangName) {
         for ($i = 0; $i < $sql->getRows(); $i++) {
             $key = $sql->getValue('keyname');
             $value = nl2br($sql->getValue('value_' . $clangId));
             self::$stringTable[$clangId][$key] = $value;
             self::$stringTableKeys[$clangId][] = $REX['ADDON']['string_table']['settings']['key_start_token'] . $key . $REX['ADDON']['string_table']['settings']['key_end_token'];
             self::$stringTableValues[$clangId][] = $value;
             $sql->next();
         }
         $sql->reset();
     }
 }
开发者ID:darwin26,项目名称:string_table,代码行数:18,代码来源:class.rex_string_table.inc.php

示例10: enterObject

    function enterObject(&$email_elements, &$sql_elements, &$warning, &$form_output, $send = 0)
    {
        $SEL = new rex_select();
        $SEL->setName('FORM[' . $this->params["form_name"] . '][el_' . $this->id . ']');
        $SEL->setId("el_" . $this->id);
        $SEL->setSize(1);
        $sql = $this->elements[4];
        $teams = new rex_sql();
        $teams->debugsql = $this->params["debug"];
        $teams->setQuery($sql);
        $sqlnames = array();
        if ($this->elements[3] != 1) {
            // mit --- keine auswahl ---
            $SEL->addOption($this->elements[3], "0");
        }
        for ($t = 0; $t < $teams->getRows(); $t++) {
            $SEL->addOption($teams->getValue($this->elements[6]), $teams->getValue($this->elements[5]));
            if (isset($this->elements[7])) {
                $sqlnames[$teams->getValue($this->elements[5])] = $teams->getValue($this->elements[7]);
            }
            $teams->next();
        }
        $wc = "";
        if (isset($warning["el_" . $this->getId()])) {
            $wc = $warning["el_" . $this->getId()];
        }
        $SEL->setStyle(' class="select ' . $wc . '"');
        if ($this->value == "" && isset($this->elements[7]) && $this->elements[7] != "") {
            $this->value = $this->elements[7];
        }
        $SEL->setSelected($this->value);
        $form_output[] = '
			<p class="formselect">
			<label class="select ' . $wc . '" for="el_' . $this->id . '" >' . $this->elements[2] . '</label>
			' . $SEL->get() . '
			</p>';
        $email_elements[$this->elements[1]] = stripslashes($this->value);
        if (isset($sqlnames[$this->value])) {
            $email_elements[$this->elements[1] . '_SQLNAME'] = stripslashes($sqlnames[$this->value]);
        }
        if (!isset($this->elements[8]) || $this->elements[8] != "no_db") {
            $sql_elements[$this->elements[1]] = $this->value;
        }
    }
开发者ID:BackupTheBerlios,项目名称:redaxo-svn,代码行数:44,代码来源:class.xform.select_single_sql.inc.php

示例11: getArticle

    function getArticle($curctype = -1)
    {
        global $module_id, $REX_USER, $REX, $I18N;
        $this->ctype = $curctype;
        $sliceLimit = '';
        if ($this->getSlice) {
            //$REX['GG'] = 0;
            $sliceLimit = " AND " . $REX['TABLE_PREFIX'] . "article_slice.id = '" . $this->getSlice . "' ";
        }
        // ----- start: article caching
        ob_start();
        ob_implicit_flush(0);
        if ($REX['GG'] && !$this->viasql && !$this->getSlice) {
            if ($this->article_id != 0) {
                $this->contents = '';
                $article_content_file = $REX['INCLUDE_PATH'] . '/generated/articles/' . $this->article_id . '.' . $this->clang . '.content';
                if ($cont = rex_get_file_contents($article_content_file)) {
                    $this->contents = $cont;
                    eval($this->contents);
                }
            }
        } else {
            if ($this->article_id != 0) {
                // ---------- alle teile/slices eines artikels auswaehlen
                $sql = "SELECT " . $REX['TABLE_PREFIX'] . "module.id, " . $REX['TABLE_PREFIX'] . "module.name, " . $REX['TABLE_PREFIX'] . "module.ausgabe, " . $REX['TABLE_PREFIX'] . "module.eingabe, " . $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'] . "module ON " . $REX['TABLE_PREFIX'] . "article_slice.modultyp_id=" . $REX['TABLE_PREFIX'] . "module.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 . "'\r\n            " . $sliceLimit . "\r\n            ORDER BY " . $REX['TABLE_PREFIX'] . "article_slice.re_article_slice_id";
                $this->CONT = new rex_sql();
                $this->CONT->debugsql = 0;
                $this->CONT->setQuery($sql);
                $RE_CONTS = array();
                $RE_CONTS_CTYPE = array();
                $RE_MODUL_OUT = array();
                $RE_MODUL_IN = array();
                $RE_MODUL_ID = array();
                $RE_MODUL_NAME = array();
                $RE_C = array();
                // ---------- 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_IN[$this->CONT->getValue('re_article_slice_id')] = $this->CONT->getValue($REX['TABLE_PREFIX'] . 'module.eingabe');
                    $RE_MODUL_OUT[$this->CONT->getValue('re_article_slice_id')] = $this->CONT->getValue($REX['TABLE_PREFIX'] . 'module.ausgabe');
                    $RE_MODUL_ID[$this->CONT->getValue('re_article_slice_id')] = $this->CONT->getValue($REX['TABLE_PREFIX'] . 'module.id');
                    $RE_MODUL_NAME[$this->CONT->getValue('re_article_slice_id')] = $this->CONT->getValue($REX['TABLE_PREFIX'] . 'module.name');
                    $RE_C[$this->CONT->getValue('re_article_slice_id')] = $i;
                    $this->CONT->next();
                }
                // ---------- moduleselect: nur module nehmen auf die der user rechte hat
                if ($this->mode == 'edit') {
                    $MODULE = new rex_sql();
                    $MODULE->setQuery('select * from ' . $REX['TABLE_PREFIX'] . 'module order by name');
                    $MODULESELECT = new rex_select();
                    $MODULESELECT->setName('module_id');
                    $MODULESELECT->setSize('1');
                    $MODULESELECT->setAttribute('onchange', 'this.form.submit();');
                    $MODULESELECT->addOption('----------------------------  ' . $I18N->msg('add_block'), '');
                    for ($i = 0; $i < $MODULE->getRows(); $i++) {
                        if ($REX_USER->hasPerm('module[' . $MODULE->getValue('id') . ']') || $REX_USER->hasPerm('admin[]')) {
                            $MODULESELECT->addOption(rex_translate($MODULE->getValue('name'), NULL, FALSE), $MODULE->getValue('id'));
                        }
                        $MODULE->next();
                    }
                }
                // ---------- SLICE IDS SORTIEREN UND AUSGEBEN
                $I_ID = 0;
                $PRE_ID = 0;
                $LCTSL_ID = 0;
                $this->CONT->reset();
                $this->article_content = "";
                for ($i = 0; $i < $this->CONT->getRows(); $i++) {
                    // ----- ctype unterscheidung
                    if ($this->mode != "edit" && $i == 0) {
                        $this->article_content = "<?php if (\$this->ctype == '" . $RE_CONTS_CTYPE[$I_ID] . "' || (\$this->ctype == '-1')) { ?>";
                    }
                    // ------------- EINZELNER SLICE - AUSGABE
                    $this->CONT->counter = $RE_C[$I_ID];
                    $slice_content = "";
                    $SLICE_SHOW = TRUE;
                    if ($this->mode == "edit") {
                        $form_url = 'index.php';
                        if ($this->setanker) {
                            $form_url .= '#addslice';
                        }
                        $this->ViewSliceId = $RE_CONTS[$I_ID];
                        // ----- add select box einbauen
                        if ($this->function == "add" && $this->slice_id == $I_ID) {
                            $slice_content = $this->addSlice($I_ID, $module_id);
                        } else {
                            // ----- BLOCKAUSWAHL - SELECT
                            $MODULESELECT->setId("module_id" . $I_ID);
                            $slice_content = '
              <form action="' . $form_url . '" method="get" id="slice' . $RE_CONTS[$I_ID] . '">
                <fieldset>
                  <legend class="rex-lgnd"><span class="rex-hide">' . $I18N->msg("add_block") . '</span></legend>
                  <input type="hidden" name="article_id" value="' . $this->article_id . '" />
                  <input type="hidden" name="page" value="content" />
                  <input type="hidden" name="mode" value="' . $this->mode . '" />
                  <input type="hidden" name="slice_id" value="' . $I_ID . '" />
                  <input type="hidden" name="function" value="add" />
                  <input type="hidden" name="clang" value="' . $this->clang . '" />
                  <input type="hidden" name="ctype" value="' . $this->ctype . '" />
//.........这里部分代码省略.........
开发者ID:BackupTheBerlios,项目名称:redaxo-svn,代码行数:101,代码来源:class.rex_article.inc.php

示例12: rex_rewriter_generate_pathnames

/**
 * rex_rewriter_generate_pathnames
 * generiert die Pathlist, abhŠngig von Aktion
 * @author markus.staab[at]redaxo[dot]de Markus Staab
 * @package redaxo4.2
 */
function rex_rewriter_generate_pathnames($params)
{
    global $REX, $REXPATH;
    if (file_exists(FULLNAMES_PATHLIST)) {
        require_once FULLNAMES_PATHLIST;
    }
    if (!isset($REXPATH)) {
        $REXPATH = array();
    }
    if (!isset($params['extension_point'])) {
        $params['extension_point'] = '';
    }
    $where = '';
    switch ($params['extension_point']) {
        // ------- sprachabhängig, einen artikel aktualisieren
        case 'CAT_DELETED':
        case 'ART_DELETED':
            unset($REXPATH[$params['id']]);
            break;
        case 'CAT_ADDED':
        case 'CAT_UPDATED':
        case 'ART_ADDED':
        case 'ART_UPDATED':
            $where = '(id=' . $params['id'] . ' AND clang=' . $params['clang'] . ') OR (path LIKE "%|' . $params['id'] . '|%" AND clang=' . $params['clang'] . ')';
            break;
            // ------- alles aktualisieren
        // ------- alles aktualisieren
        case 'ALL_GENERATED':
        default:
            $where = '1=1';
            break;
    }
    if ($where != '') {
        $db = new rex_sql();
        // $db->debugsql=true;
        $db->setQuery('SELECT id,clang,path,startpage FROM ' . $REX['TABLE_PREFIX'] . 'article WHERE ' . $where . ' and revision=0');
        while ($db->hasNext()) {
            $clang = $db->getValue('clang');
            $pathname = '';
            if (count($REX['CLANG']) > 1) {
                $pathname = $REX['CLANG'][$clang] . '/';
            }
            // pfad über kategorien bauen
            $path = trim($db->getValue('path'), '|');
            if ($path != '') {
                $path = explode('|', $path);
                foreach ($path as $p) {
                    $ooc = OOCategory::getCategoryById($p, $clang);
                    $name = $ooc->getName();
                    unset($ooc);
                    // speicher freigeben
                    $pathname = rex_rewriter_appendToPath($pathname, $name);
                }
            }
            $ooa = OOArticle::getArticleById($db->getValue('id'), $clang);
            if ($ooa->isStartArticle()) {
                $ooc = $ooa->getCategory();
                $catname = $ooc->getName();
                unset($ooc);
                // speicher freigeben
                $pathname = rex_rewriter_appendToPath($pathname, $catname);
            }
            // eigentlicher artikel anhängen
            $name = $ooa->getName();
            unset($ooa);
            // speicher freigeben
            $pathname = rex_rewriter_appendToPath($pathname, $name);
            $pathname = substr($pathname, 0, strlen($pathname) - 1) . '.html';
            $REXPATH[$db->getValue('id')][$db->getValue('clang')] = $pathname;
            $db->next();
        }
    }
    rex_put_file_contents(FULLNAMES_PATHLIST, "<?php\n\$REXPATH = " . var_export($REXPATH, true) . ";\n");
}
开发者ID:BackupTheBerlios,项目名称:redaxo-svn,代码行数:80,代码来源:class.rewrite_fullnames.inc.php

示例13: getAllKurse

 /**
  * Holt alle zugehörigen Kurse aus der Datenbank.
  * @param boolean $nur_online TRUE, wenn nur online Kurse ausgegeben werden,
  * sonst false
  * @return Kurse[] Array mit Kursobjekten.
  */
 public function getAllKurse($nur_online = TRUE)
 {
     $query = "SELECT kurs_id FROM " . $this->table_prefix . "d2u_kurse_kurse " . "WHERE (terminkategorie_ids LIKE '%|" . $this->terminkategorie_id . "|%' " . " OR terminkategorie_ids = '" . $this->terminkategorie_id . "') ";
     if ($nur_online) {
         $query .= "AND status = 'online' " . "AND (datum_von = '' OR datum_von >= '" . date("Y-m-d", time()) . "') ";
     }
     $query .= "ORDER BY datum_von, titel";
     $result = new rex_sql();
     $result->setQuery($query);
     $num_rows = $result->getRows();
     $kurse = array();
     for ($i = 0; $i < $num_rows; $i++) {
         $kurse[] = new Kurs($result->getValue("kurs_id"), $this->table_prefix);
         $result->next();
     }
     return $kurse;
 }
开发者ID:TobiasKrais,项目名称:d2u_kurse,代码行数:23,代码来源:class.terminkategorie.inc.php

示例14: rexselect

 }
 $csuchfeld = rex_request("csuchfeld", "array");
 $SUCHSEL = new rexselect();
 $SUCHSEL->setMultiple(1);
 $SUCHSEL->setSize(5);
 $SUCHSEL->setName("csuchfeld[]");
 $SUCHSEL->setStyle("width:100%;");
 $ssql = new rex_sql();
 //$ssql->debugsql = 1;
 $ssql->setQuery("select * from " . $table_field . " order by prior");
 for ($i = 0; $i < $ssql->getRows(); $i++) {
     $SUCHSEL->addOption($ssql->getValue("name"), $ssql->getValue("userfield"));
     if (!is_array($csuchfeld)) {
         $SUCHSEL->setSelected($ssql->getValue("field"));
     }
     $ssql->next();
 }
 foreach ($csuchfeld as $cs) {
     $SUCHSEL->setSelected($cs);
     $link .= "&csuchfeld[]=" . $cs;
 }
 $cstatus = rex_request("cstatus", "string");
 $STATUSSEL = new rexselect();
 $STATUSSEL->setName("cstatus");
 $STATUSSEL->setStyle("width:100%;");
 $STATUSSEL->addOption("Aktiv & Inaktiv", "");
 $STATUSSEL->addOption("Aktiv", 1);
 $STATUSSEL->addOption("Inaktiv", 0);
 if ($cstatus != "") {
     $STATUSSEL->setSelected($cstatus);
     $link .= "&cstatus=" . urlencode($cstatus);
开发者ID:BackupTheBerlios,项目名称:redaxo-svn,代码行数:31,代码来源:user.inc.php

示例15: organizePriorities

 function organizePriorities($newPrio, $oldPrio)
 {
     if ($newPrio == $oldPrio) {
         return;
     }
     if ($newPrio < $oldPrio) {
         $addsql = 'desc';
     } else {
         $addsql = 'asc';
     }
     $sql = new rex_sql();
     $sql->debugsql =& $this->debug;
     $sql->setQuery('SELECT field_id FROM ' . $this->tableName . ' WHERE name LIKE "' . $this->metaPrefix . '%" ORDER BY prior, updatedate ' . $addsql);
     $updateSql = new rex_sql();
     $updateSql->debugsql =& $this->debug;
     for ($i = 0; $i < $sql->getRows(); $i++) {
         $updateSql->setTable($this->tableName);
         $updateSql->setValue('prior', $i + 1);
         $updateSql->setWhere('name LIKE "' . $this->metaPrefix . '%" AND field_id = ' . $sql->getValue('field_id'));
         $updateSql->update();
         $sql->next();
     }
 }
开发者ID:BackupTheBerlios,项目名称:redaxo-svn,代码行数:23,代码来源:class.rex_tableExpander.inc.php


注:本文中的rex_sql::next方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。