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


PHP sql::getValue方法代码示例

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


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

示例1: rex_glossar_replace

/**
 * Glossar Addon
 * <
 * @author staab[at]public-4u[dot]de Markus Staab
 * @author <a href="http://www.public-4u.de">www.public-4u.de</a>
 * @package redaxo3
 * @version $Id: function_replace.inc.php,v 1.4 2008/01/25 09:48:36 kills Exp $
 */
function rex_glossar_replace($params)
{
    global $REX, $mypage, $I18N_GLOSSAR;
    $string = $params['subject'];
    // Aufteilen des Strings, damit nur im Body ersetzt wird
    $bodystart = strpos($string, '<body>');
    $header = substr($string, 0, $bodystart);
    $body = substr($string, $bodystart);
    // Bereiche ersetzen, in denen keine Glossar ersetzungen durchgeführt werden sollen
    // welche nicht innerhalb des Tags sind
    $back_srch = array();
    $back_rplc = array();
    $mtchs = array();
    if (preg_match_all('/(<textarea.*?>(.*?)<\\/textarea>)/s', $body, $mtchs)) {
        foreach ($mtchs[2] as $key => $mtch) {
            $back_srch[$key] = '###SPACER###' . $key . '###';
            $back_rplc[$key] = $mtch;
            $body = str_replace($mtch, '###SPACER###' . $key . '###', $body);
        }
    }
    $sql = new sql();
    //$sql->debugsql = true;
    $sql->setQuery('SELECT * FROM rex_13_glossar, rex_13_glossar_lang WHERE language = lang_id ORDER BY CHAR_LENGTH(shortcut) DESC');
    // IE doesnt support <abbr>
    if (strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE')) {
        $replacetag = 'acronym';
    } else {
        $replacetag = 'abbr';
    }
    $replaceformat = '<' . $replacetag . ' class=\\"abbr\\" title=\\"%desc% (%lang%)\\">%short%</' . $replacetag . '>';
    $searches = array();
    $replaces = array();
    for ($i = 0; $i < $sql->getRows(); $i++) {
        $language = htmlspecialchars($sql->getValue('lang_name'));
        $shortcut = htmlspecialchars($sql->getValue('shortcut'));
        $description = htmlspecialchars($sql->getValue('description'));
        $casesense = $sql->getValue('casesense');
        // Escape Shortcut for preg_match
        $escapedshortcut = preg_quote($shortcut, '/');
        $escapedentitiesshortuct = htmlentities($escapedshortcut);
        if ($escapedentitiesshortuct == $escapedshortcut) {
            $search = '/((<[^>]*)|' . $escapedshortcut . ')/e';
        } else {
            $search = '/((<[^>]*)|' . $escapedshortcut . '|' . $escapedentitiesshortuct . ')/e';
        }
        $replacer = _rex_glossar_parse_replace_format($replaceformat, array('lang' => $language, 'desc' => $description, 'short' => $shortcut));
        $replace = '"\\2"=="\\1" && strpos( "\\1", "<' . $replacetag . '>") === false ? "\\1":"' . $replacer . '"';
        if ($casesense == 0) {
            $search .= 'i';
        }
        $searches[] = $search;
        $replaces[] = $replace;
        $sql->next();
    }
    // Ersetzungen durchführen
    $body = stripslashes(preg_replace($searches, $replaces, $body));
    // Vorher ausgeschlossene Bereiche wieder einpflegen
    $body = str_replace($back_srch, $back_rplc, $body);
    return $header . $body;
}
开发者ID:BackupTheBerlios,项目名称:redaxo-addons,代码行数:68,代码来源:function_replace.inc.php

示例2: rex_opf_sync

function rex_opf_sync()
{
    global $REX;
    // abgleich der replacevalue felder..
    $s = new sql();
    // $s->debugsql = 1;
    $s->setQuery("select clang, replacename, name, count(replacename) from rex_opf_lang group by replacename");
    for ($i = 0; $i < $s->getRows(); $i++) {
        if (count($REX['CLANG']) != $s->getValue("count(replacename)")) {
            reset($REX['CLANG']);
            while (list($key, $val) = each($REX['CLANG'])) {
                $lclang = $key;
                $replacename = $s->getValue("replacename");
                $name = $s->getValue("name");
                $gs = new sql();
                $gs->setQuery("select clang from rex_opf_lang where clang={$lclang} and replacename='{$replacename}'");
                if ($gs->getRows() == 0) {
                    // erstelle
                    $us = new sql();
                    $us->setTable("rex_opf_lang");
                    $us->setValue("clang", $lclang);
                    $us->setValue("replacename", $replacename);
                    $us->setValue("name", $name);
                    $us->insert();
                }
            }
        }
        $s->next();
    }
}
开发者ID:BackupTheBerlios,项目名称:redaxo-addons,代码行数:30,代码来源:index.inc.php

示例3: sql

 function glossar_replace($string)
 {
     global $REX, $mypage;
     $I18N_GLOSSAR = new i18n($REX[LANG], $REX[INCLUDE_PATH] . "/addons/{$mypage}/lang/");
     // CREATE LANG OBJ FOR THIS ADDON
     $sql = new sql();
     $sql->setQuery("select * from rex__glossar order by shortcut");
     for ($i = 0; $i < $sql->getRows(); $i++) {
         $language = $sql->getValue("language");
         if ($language == "0") {
             $language = $I18N_GLOSSAR->msg('lang_de_short');
         } elseif ($language == "1") {
             $language = $I18N_GLOSSAR->msg('lang_en_short');
         } else {
             $language = $I18N_GLOSSAR->msg('lang_fr_short');
         }
         $id = $sql->getValue("short_id");
         $shortcut = htmlentities($sql->getValue("shortcut"));
         $escapedshortcut = str_replace('.', '\\.', $shortcut);
         $description = htmlentities($sql->getValue("description"));
         $language = trim($language);
         $casesense = $sql->getValue("casesense");
         $search = "/((<[^>]*)|{$escapedshortcut})/e";
         $replace = '"\\2"=="\\1"? "\\1":"<span lang=\\"' . $language . '\\" xml:lang=\\"' . $language . '\\" title=\\"' . $language . ': ' . $description . '\\" class=\\"shortcut\\">' . $shortcut . '</span>"';
         $subject = $string;
         if ($casesense == 0) {
             $search .= 'i';
         }
         $string = preg_replace($search, $replace, $subject);
         $sql->counter++;
     }
     return $string;
 }
开发者ID:BackupTheBerlios,项目名称:redaxo,代码行数:33,代码来源:config.inc.php

示例4: sql

 function rex_opf($params)
 {
     global $REX;
     $content = $params['subject'];
     $gv = new sql();
     // $gv->debugsql = 1;
     $gv->setQuery("select * from rex_opf_lang where clang='" . $REX['CUR_CLANG'] . "'");
     for ($i = 0; $i < $gv->getRows(); $i++) {
         $content = str_replace($gv->getValue("replacename"), $gv->getValue("name"), $content);
         $gv->next();
     }
     return $content;
 }
开发者ID:BackupTheBerlios,项目名称:redaxo-addons,代码行数:13,代码来源:config.inc.php

示例5: getUpdateDate

 static function getUpdateDate($format = 'd.m.Y')
 {
     global $REX;
     $query = 'SELECT updatedate FROM ' . $REX['TABLE_PREFIX'] . 'article WHERE updatedate <> 0 ORDER BY updatedate DESC LIMIT 1';
     $sql = new sql();
     $sql->setQuery($query);
     return date($format, $sql->getValue('updatedate'));
 }
开发者ID:olien,项目名称:be_utilities,代码行数:8,代码来源:class.rex_update_date.inc.php

示例6: stat

 function stat()
 {
     $this->MAIN['stamp'] = array();
     $this->MAIN['ip'] = array();
     $this->MAIN['pageviews'] = array();
     // which pages in an array under this one
     $this->MAIN['useragent'] = array();
     $this->MAIN['hostname'] = array();
     $this->MAIN['referer'] = array();
     $this->BROWSER['type'] = array();
     $this->BROWSER['os'] = array();
     $this->REFERER = array();
     $this->SEARCH['engine'] = array();
     $this->SEARCH['words'] = array();
     $this->evalshows = array("REX_EVAL_DAY", "REX_EVAL_MONTH", "REX_EVAL_ALLARTICLE", "REX_EVAL_TOP10ARTICLE", "REX_EVAL_WORST10ARTICLE", "REX_EVAL_LAENDER", "REX_EVAL_SUCHMASCHINEN", "REX_EVAL_REFERER", "REX_EVAL_BROWSER", "REX_EVAL_OPERATINGSYSTEM", "REX_EVAL_SEARCHWORDS");
     $this->evalsnipps = array();
     $statartikel = new sql();
     $statartikel->setQuery("SELECT id,name FROM rex_article");
     for ($i = 0; $i < $statartikel->getRows(); $i++) {
         $this->ART[$statartikel->getValue("id")] = $statartikel->getValue("name");
         $statartikel->next();
     }
 }
开发者ID:BackupTheBerlios,项目名称:redaxo,代码行数:23,代码来源:class.stat.inc.php

示例7: get

 /**
  * Gibt den HTML Content zurück
  */
 function get()
 {
     $table = $this->getTable();
     $field = $this->getField();
     $foreignField = $this->getForeignField();
     $value = $this->formatValue();
     $qry = 'SELECT ' . $field . ' FROM ' . $table . ' WHERE ' . $foreignField . ' = "' . $value . '"';
     $sql = new sql();
     // $sql->debugsql = true;
     $sql->setQuery($qry);
     if ($sql->getRows() == 1) {
         return $sql->getValue($field);
     }
     return '';
 }
开发者ID:BackupTheBerlios,项目名称:gbforredaxo,代码行数:18,代码来源:field.foreignField.inc.php

示例8: getArticlesByType

 function getArticlesByType($article_type_id, $ignore_offlines = false, $clang = false)
 {
     global $REX;
     if ($clang === false) {
         $clang = $REX[CUR_CLANG];
     }
     $offline = $ignore_offlines ? " and status = 1 " : "";
     $artlist = array();
     $sql = new sql();
     $sql->setQuery("select " . implode(',', OORedaxo::getClassVars()) . " FROM rex_article WHERE type_id = '{$article_type_id}' AND clang='{$clang}' {$offline}");
     for ($i = 0; $i < $sql->getRows(); $i++) {
         foreach (OORedaxo::getClassVars() as $var) {
             $article_data['_' . $var] = $sql->getValue($var);
         }
         $artlist[] = new OOArticle($article_data);
         $sql->next();
     }
     return $artlist;
 }
开发者ID:BackupTheBerlios,项目名称:redaxo-svn,代码行数:19,代码来源:class.ooarticle.inc.php

示例9: showall

 function showall($next)
 {
     global $REX;
     // ------------- FALLS KEIN ROWSELECT ALLE DATENSAETZE HOLEN UND ANZAHL SETZEN
     if ($this->rows == "") {
         $this->sql = new sql($this->DB);
         $this->sql->setQuery($this->query);
         $this->rows = $this->sql->getRows();
     }
     $echo = "<table width=770 cellpadding=5 cellspacing=1 border=0 bgcolor=#ffffff>";
     $echo .= $this->table_header;
     // ------------- BLAETTERN
     if (!($next > 0 && $next <= $this->rows)) {
         $next = 0;
     }
     $list_start = $next;
     $list_end = $next + $this->list_amount;
     if ($list_end > $this->rows) {
         $list_end = $this->rows;
     }
     $before = $next - $this->list_amount;
     if ($before < 0) {
         $before = 0;
     }
     $next = $next + $this->list_amount;
     if ($next > $this->rows) {
         $next = $next - $this->list_amount;
     }
     if ($next < 0) {
         $next = 0;
     }
     $bhead = $this->blaettern_head;
     $bhead = str_replace("###LINK_BACK###", $this->addonlink . $before, $bhead);
     $bhead = str_replace("###LINK_NEXT###", $this->addonlink . $next, $bhead);
     $bhead = str_replace("###LIST_START###", $list_start, $bhead);
     $bhead = str_replace("###LIST_END###", $list_end, $bhead);
     $bhead = str_replace("###LIST_ALL###", $this->rows, $bhead);
     if ($this->blaettern_top) {
         $echo .= "<tr><td colspan=" . $this->data_num . " class=lgrey>{$bhead}</td></tr>";
     }
     // ------------ QUERY NEU ERSTELLEN MIT LIMIT
     $limit = "LIMIT " . $list_start . "," . $this->list_amount;
     $order = "";
     if ($this->order_name != "") {
         $order = " order by " . $this->order_name . " " . $this->order_type;
     } elseif ($this->default_order_name != "") {
         $order = " order by " . $this->default_order_name . " " . $this->default_order_type;
     }
     $SQL = new sql($this->DB);
     $SQL->debugsql = $this->debugsql;
     $SQL->setQuery("{$this->query} {$order} {$limit}");
     // ------------ <TH>HEADLINES
     $echo .= "<tr>";
     for ($i = 1; $i <= $this->data_num; $i++) {
         $echo .= "<th>";
         if ($this->data_order[$i]) {
             $type = $this->order_type;
             if ($type == "asc") {
                 $type = "desc";
             } else {
                 $type = "asc";
             }
             $echo .= " <a href=" . $this->addonlink . "&" . $this->var_ordername . "=" . $this->data[$i] . "&" . $this->var_ordertype . "=" . $type . "&" . $this->var_next . "={$before}><b>" . $this->data_name[$i] . "</b>" . $this->sort_char . "</a>";
         } else {
             $echo .= $this->data_name[$i];
         }
         $echo .= "</th>";
     }
     $echo .= "</tr>";
     // ------------ ERSTELLUNG DER LISTE
     for ($j = 0; $j < $SQL->getRows(); $j++) {
         for ($i = 1; $i <= $this->data_num; $i++) {
             // ----- START: DATENSATZ
             $echo .= "<td class=grey valign=top " . $this->td[$this->data_num] . ">";
             // ----- START: FORMAT
             if (!is_array($this->format[$i])) {
                 $value = htmlentities($SQL->getValue($this->data[$i]));
             } else {
                 $value = $SQL->getValue($this->data[$i]);
                 $contentvalue = $this->data[$i];
                 for ($k = 0; $k < count($this->format[$i]); $k++) {
                     switch ($this->format[$i][$k]) {
                         case "link":
                             $linkid = $SQL->getValue($this->format_value2[$i][$k]);
                             $value = '<a href="' . $this->format_value1[$i][$k] . $linkid . $this->format_value3[$i][$k] . '" ' . $this->format_value4[$i][$k] . '>' . $value . '</a>';
                             break;
                         case "ifvalue":
                             if ($value == $this->format_value1[$i][$k]) {
                                 $value = $this->format_value2[$i][$k];
                             }
                             break;
                         case "ifempty":
                             if ($value == "") {
                                 $value = $this->format_value1[$i][$k];
                             }
                             break;
                         case "prefix":
                             $value = $this->format_value1[$i][$k] . "{$value}";
                             break;
                         case "suffix":
//.........这里部分代码省略.........
开发者ID:BackupTheBerlios,项目名称:redaxo-addons,代码行数:101,代码来源:class.rexlist.inc.php

示例10: showForm

 function showForm()
 {
     global $FORM, $REX;
     // --------------------------------- EDIT: 1. WERTE AUS DB HOLEN
     for ($i = 0; $i < $this->counter; $i++) {
         if ($this->value_type[$i] != "multipleselectsql") {
             if ($FORM[$this->rfid][submit] != 1 && $this->form_type == "edit") {
                 $FORM[$this->rfid][values][$i] = htmlentities($this->sql->getValue($this->value_tbl[$i]));
             } else {
                 $FORMVAL[$this->rfid][values][$i] = htmlentities($this->sql->getValue($this->value_tbl[$i]));
             }
         } else {
             $selsql = new sql();
             $selsql->setQuery("select * from " . $this->type_value5[$i] . " where " . $this->type_value6[$i]);
             for ($j = 0; $j < $selsql->getRows(); $j++) {
                 if ($FORM[$this->rfid][submit] != 1 && $this->form_type == "edit") {
                     $FORM[$this->rfid][values][$i][] = $selsql->getValue($this->type_value7[$i]);
                 } else {
                     $FORMVAL[$this->rfid][values][$i][] = $selsql->getValue($this->type_value7[$i]);
                 }
                 $selsql->next();
             }
         }
     }
     // --------------------------------- ABGESCHICKTE EINGABEN CHECKEN
     if ($FORM[$this->rfid][submit] == 1) {
         // ----------------------------- eingaben überprüfen
         $this->form_show = false;
         for ($i = 0; $i < $this->counter; $i++) {
             if ($this->value_check[$i] != "") {
                 if ($FORM[$this->rfid][values][$i] == "") {
                     $errmsg .= "Bitte tragen Sie '" . $this->value_form[$i] . "' ein! <br>";
                     $this->form_show = true;
                 }
             }
         }
     }
     // --------------------------------- EDIT: SPEICHERN FALLS MÖGLICH
     if ($FORM[$this->rfid][submit] == 1 && $this->form_type == "edit") {
         if ($errmsg == "") {
             $aa = new sql();
             $aa->debugsql = 0;
             $aa->setTable($this->tbl_name);
             $aa->where($this->form_where);
             for ($i = 0; $i < $this->counter; $i++) {
                 if ($this->value_type[$i] == "picjpg") {
                     $folder = $this->type_value1[$i];
                     $foldertmp = $REX[INCLUDE_PATH] . "/../../ss_pics/";
                     $fname = $_FILES[FORM][name][$this->rfid][values][$i];
                     if ($fname != "") {
                         // neues file
                         $nfname = $this->checkFilename($fname, $folder);
                         if ($nfname[ext] == ".jpg") {
                             $ftmpname = $_FILES[FORM][tmp_name][$this->rfid][values][$i];
                             move_uploaded_file($ftmpname, $foldertmp . $nfname[nname]);
                             $this->resizeJPGImage($foldertmp . $nfname[nname], $folder . $nfname[nname], $this->type_value3[$i], $this->type_value4[$i]);
                             $FORM[$this->rfid][values][$i] = $nfname[nname];
                             $aa->setValue($this->value_tbl[$i], $FORM[$this->rfid][values][$i]);
                         }
                     } elseif ($FORM[$this->rfid][values][$i][delete] != "") {
                         $FORM[$this->rfid][values][$i] = "";
                         $aa->setValue($this->value_tbl[$i], $FORM[$this->rfid][values][$i]);
                     } else {
                         $FORM[$this->rfid][values][$i] = $FORMVAL[$this->rfid][values][$i];
                     }
                 } elseif ($this->value_type[$i] == "file") {
                     $folder = $REX[INCLUDE_PATH] . "/../../ss_pics/";
                     $fname = $_FILES[FORM][name][$this->rfid][values][$i];
                     if ($fname != "") {
                         $nfname = $this->checkFilename($fname, $folder);
                         $ftmpname = $_FILES[FORM][tmp_name][$this->rfid][values][$i];
                         move_uploaded_file($ftmpname, $folder . $nfname[nname]);
                         $FORM[$this->rfid][values][$i] = $nfname[nname];
                         $aa->setValue($this->value_tbl[$i], $FORM[$this->rfid][values][$i]);
                     } elseif ($FORM[$this->rfid][values][$i][delete] != "") {
                         $FORM[$this->rfid][values][$i] = "";
                         $aa->setValue($this->value_tbl[$i], $FORM[$this->rfid][values][$i]);
                     } else {
                         $FORM[$this->rfid][values][$i] = $FORMVAL[$this->rfid][values][$i];
                     }
                 } elseif ($this->value_type[$i] == "multipleselectsql") {
                     // multipleselect
                     $ms = new sql();
                     $ms->query("delete from " . $this->type_value5[$i] . " where " . $this->type_value6[$i]);
                     if (is_Array($FORM[$this->rfid][values][$i])) {
                         reset($FORM[$this->rfid][values][$i]);
                         for ($j = 0; $j < count($FORM[$this->rfid][values][$i]); $j++) {
                             $val = current($FORM[$this->rfid][values][$i]);
                             $sql = "insert into " . $this->type_value5[$i] . " set " . $this->type_value6[$i] . ", " . $this->type_value7[$i] . "={$val}";
                             $ms->query($sql);
                             next($FORM[$this->rfid][values][$i]);
                         }
                     }
                 } elseif ($this->value_type[$i] == "subline" || $this->value_type[$i] == "empty") {
                 } elseif ($this->value_type[$i] == "datum") {
                     $tag = substr($FORM[$this->rfid][values][$i], 0, 2);
                     $monat = substr($FORM[$this->rfid][values][$i], 3, 2);
                     $jahr = substr($FORM[$this->rfid][values][$i], 6, 4);
                     $aa->setValue($this->value_tbl[$i], mktime(0, 0, 0, $monat, $tag, $jahr));
                 } else {
//.........这里部分代码省略.........
开发者ID:BackupTheBerlios,项目名称:redaxo,代码行数:101,代码来源:class.rexform.inc.php

示例11: sql

            }
        }
        echo "</table>";
        $OUT = false;
    }
}
if ($OUT) {
    // ausgabe modulliste !
    echo "<table border=0 cellpadding=5 cellspacing=1 width=770>\r\n\t\t<tr>\r\n\t\t\t<th width=30><a href=index.php?page=module&function=add><img src=pics/modul_plus.gif width=16 height=16 border=0></a></th>\r\n\t\t\t<th align=left width=300>" . $I18N->msg("module_description") . "</th>\r\n\t\t\t<th align=left>" . $I18N->msg("module_functions") . "</th>\r\n\t\t\t<th align=left width=100>PHP</th>\r\n\t\t\t<th align=left width=100>HTML</th>\r\n\t\t</tr>\r\n\t\t";
    if ($message != "") {
        echo "<tr><td align=center class=warning><img src=pics/warning.gif width=16 height=16></td><td colspan=5 class=warning>{$message}</td></tr>";
    }
    $sql = new sql();
    $sql->setQuery("select * from rex_modultyp order by name");
    for ($i = 0; $i < $sql->getRows(); $i++) {
        echo "\t<tr bgcolor=#eeeeee>\r\n\t\t\t\t<td class=grey align=center><img src=pics/modul.gif width=16 height=16></td>\r\n\t\t\t\t<td class=grey><a href=index.php?page=module&modul_id=" . $sql->getValue("id") . "&function=edit>" . htmlentities($sql->getValue("name")) . "</a>";
        if ($REX_USER->isValueOf("rights", "expertMode[]")) {
            echo " [" . $sql->getValue("id") . "]";
        }
        echo "</td>\r\n\t\t\t\t<td class=grey><a href=index.php?page=module&modul_id=" . $sql->getValue("id") . "&function=delete>" . $I18N->msg("delete_module") . "</a></td>\r\n\t\t\t\t<td class=grey>";
        if ($sql->getValue("php_enable") == 1) {
            echo $I18N->msg("yes");
        } else {
            echo "&nbsp;";
        }
        echo "</td>\r\n\t\t\t\t<td class=grey>";
        if ($sql->getValue("html_enable") == 1) {
            echo $I18N->msg("yes");
        }
        echo "</td>\r\n\t\t\t</tr>";
        $sql->counter++;
开发者ID:BackupTheBerlios,项目名称:redaxo-svn,代码行数:31,代码来源:module.modules.inc.php

示例12: sql

}
if ($OUT) {
    // ausgabe modulliste !
    echo '<table class="rex" style="table-layout:auto;" cellpadding="5" cellspacing="1">
    <tr>
      <th class="icon"><a href="index.php?page=module&amp;function=add"><img src="pics/modul_plus.gif" width="16" height="16" border="0" alt="' . $I18N->msg("create_module") . '" title="' . $I18N->msg("create_module") . '"></a></th>
      <th class="icon">ID</th>
      <th width="300">' . $I18N->msg("module_description") . '</th>
      <th>' . $I18N->msg("module_functions") . '</th>
    </tr>
    ' . "\n";
    if (isset($message) and $message != '') {
        echo '<tr class="warning"><td align="center"><img src="pics/warning.gif" width="16" height="16"></td><td colspan="3">' . $message . '</td></tr>';
    }
    $sql = new sql();
    $sql->setQuery("SELECT * FROM rex_modultyp ORDER BY name");
    for ($i = 0; $i < $sql->getRows(); $i++) {
        echo '  <tr>
        <td class="icon"><a href="index.php?page=module&amp;modul_id=' . $sql->getValue("id") . '&amp;function=edit"><img src="pics/modul.gif" width="16" height="16" border="0"></a></td>
        <td class="icon">' . $sql->getValue("id") . '</td>
        <td><a href="index.php?page=module&amp;modul_id=' . $sql->getValue("id") . '&amp;function=edit">' . htmlspecialchars($sql->getValue("name")) . '</a>' . "\n";
        if ($REX_USER->isValueOf("rights", "expertMode[]")) {
            echo ' [' . $sql->getValue("id") . ']';
        }
        echo '</td>
        <td><a href="index.php?page=module&amp;modul_id=' . $sql->getValue("id") . '&amp;function=delete" onclick="return confirm(\'' . $I18N->msg('delete') . ' ?\')">' . $I18N->msg("delete_module") . '</a></td>
      </tr>' . "\n";
        $sql->counter++;
    }
    echo '</table>';
}
开发者ID:BackupTheBerlios,项目名称:redaxo-svn,代码行数:31,代码来源:module.modules.inc.php

示例13: select

     $meta_sql->update();
     $article->setQuery("select * from " . $REX['TABLE_PREFIX'] . "article where id='{$article_id}' and clang='{$clang}'");
     if (!isset($message)) {
         $message = '';
     }
     $err_msg = $I18N->msg("metadata_updated") . $message;
     rex_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['TABLE_PREFIX'] . "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"));
 // Artikeltyp-Auswahl nur anzeigen, wenn mehr als ein Typ vorhanden ist
 if ($typesql->getRows() <= 1) {
     $out = "<input type=hidden name=type_id value=0>";
 } else {
     $out = "<tr><td class=grey>" . $I18N->msg("article_type_list_name") . "</td><td class=grey>" . $typesel->out() . "</td></tr>";
 }
 echo "  <table border=0 cellpadding=5 cellspacing=1 width=100%>\n        <form action=index.php method=post ENCTYPE=multipart/form-data name=REX_FORM>\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=save value=1>\n        <input type=hidden name=clang value={$clang}>\n        <input type=hidden name=ctype value={$ctype}>\n        <tr>\n          <td colspan=2>" . $I18N->msg("general") . "</td>\n        </tr>";
 if (isset($err_msg) and $err_msg != "") {
     echo '<tr><td colspan="2" class="warning"><font class="warning">' . $err_msg . '</font></td></tr>';
 }
 function selectdate($date, $extens)
 {
开发者ID:BackupTheBerlios,项目名称:redaxo,代码行数:31,代码来源:content.inc.php

示例14: getNextSlice

    function getNextSlice()
    {
        global $REX;
        $table = '';
        $table = $REX['TABLE_PREFIX'] . "article_slice";
        $sql = new sql();
        $query = <<<EOD
SELECT
  id,re_article_slice_id,value1,value2,value3,value4,value5,value6,
  value7,value8,value9,value10,file1,file2,file3,file4,file5,file6,
  file7,file8,file9,file10,link1,link2,link3,link4,link5,link6,link7,
  link8,link9,link10,php,html,article_id,modultyp_id
FROM {$table}
WHERE re_article_slice_id = {$this->_id}
EOD;
        $sql->setQuery($query);
        if ($sql->getRows() == 1) {
            return new OOArticleSlice($sql->getValue("id"), $sql->getValue("re_article_slice_id"), $sql->getValue("value1"), $sql->getValue("value2"), $sql->getValue("value3"), $sql->getValue("value4"), $sql->getValue("value5"), $sql->getValue("value6"), $sql->getValue("value7"), $sql->getValue("value8"), $sql->getValue("value9"), $sql->getValue("value10"), $sql->getValue("file1"), $sql->getValue("file2"), $sql->getValue("file3"), $sql->getValue("file4"), $sql->getValue("file5"), $sql->getValue("file6"), $sql->getValue("file7"), $sql->getValue("file8"), $sql->getValue("file9"), $sql->getValue("file10"), $sql->getValue("link1"), $sql->getValue("link2"), $sql->getValue("link3"), $sql->getValue("link4"), $sql->getValue("link5"), $sql->getValue("link6"), $sql->getValue("link7"), $sql->getValue("link8"), $sql->getValue("link9"), $sql->getValue("link10"), $sql->getValue("php"), $sql->getValue("html"), $sql->getValue("article_id"), $sql->getValue("modultyp_id"));
        }
        return null;
    }
开发者ID:BackupTheBerlios,项目名称:redaxo,代码行数:21,代码来源:class.ooarticleslice.inc.php

示例15: deleteMessage

 function deleteMessage($message_id)
 {
     // reply
     $r_sql = new sql();
     $r_sql->setQuery("select * from rex_5_board where message_id='{$message_id}' and board_id='" . $this->boardname . "'");
     if ($r_sql->getRows() == 1) {
         if ($r_sql->getValue("re_message_id") != 0) {
             // reply
             $ur_sql = new sql();
             $ur_sql->setTable("rex_5_board");
             $ur_sql->where("message_id='{$message_id}'");
             $ur_sql->setValue("status", 0);
             $ur_sql->update();
             $message_id = $r_sql->getValue("re_message_id");
             // update topic
             $u_sql = new sql();
             $u_sql->setQuery("select * from rex_5_board where re_message_id='{$message_id}' and status='1'");
             $u_sql->setTable("rex_5_board");
             $u_sql->where("message_id='{$message_id}'");
             $u_sql->setValue("replies", $u_sql->getRows());
             $u_sql->update();
             $this->msg["bb_msg_id"] = $r_sql->getValue("re_message_id");
             $return = $this->showMessage();
         } else {
             // topic
             $u_sql = new sql();
             $u_sql->setTable("rex_5_board");
             $u_sql->where("message_id='{$message_id}' or re_message_id='{$message_id}'");
             $u_sql->setValue("status", 0);
             $u_sql->update();
             $this->errmsg = $this->text[250];
             $return = $this->showMessages();
         }
     } else {
         $this->errmsg = $this->text[260];
         $return = $this->showMessages();
     }
     return $return;
 }
开发者ID:BackupTheBerlios,项目名称:redaxo-addons,代码行数:39,代码来源:class.rex_com_board.inc.php


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