コード例 #1
0
ファイル: search.php プロジェクト: rjdesign/Ilch-1.2
 * @copyright (C) 2000-2010 ilch.de
 * @version $Id$
 */
defined('main') or die('no direct access');
$such = $menu->get(1);
if ($such == 'aeit') {
    if (isset($_POST['name'])) {
        $name = escape($_POST['name'], 'string');
        $uid = @db_result(db_query("SELECT `id` FROM `prefix_user` WHERE `name` = BINARY '" . $name . "'"));
        if ($uid > 0) {
            $menu->set_url(2, $uid);
        }
    }
    if ($menu->get(2) >= 1 and $menu->get(2) != $_SESSION['authid']) {
        $uid = $menu->get(2);
        $name = get_n($uid);
        $mtitle = $lang['posts'] . ' ' . $lang['from'] . ' ' . $name;
    } else {
        $uid = $_SESSION['authid'];
        $mtitle = $lang['ownposts'];
        $name = '';
    }
} elseif ($such == 'aubt') {
    $mtitle = $lang['topicwithnoreply'];
} else {
    $mtitle = $lang['newtopicssincelastvisit'];
}
$title = $allgAr['title'] . ' :: Forum :: ' . $mtitle;
$hmenu = $extented_forum_menu . '<a class="smalfont" href="index.php?forum">Forum</a><b> &raquo; </b> ' . $mtitle;
$design = new design($title, $hmenu, 1);
$design->header();
コード例 #2
0
function regerar_dados()
{
    $lines = file("config/Export1.csv");
    $c = 0;
    $vars = array();
    $SQL = array();
    echo "INSERT INTO valor_variavel_mun(fk_ano_referencia, fk_municipio,fk_variavel,valor) VALUES ";
    foreach ($lines as $linha) {
        if ($c == 0) {
            $c++;
            $exp = explode(";", $linha);
            foreach ($exp as $var) {
                $vars[] = $var;
            }
            continue;
        }
        $l = explode(";", $linha);
        $t = 0;
        foreach ($l as $m) {
            if ($t == 0) {
                $t++;
                continue;
            }
            $SQL[] = "(3,{$l[0]},{$vars[$t]}," . get_n($m) . ")";
            $t++;
        }
        echo implode(",", $SQL);
        echo ",";
        $SQL = array();
        $c++;
    }
}
コード例 #3
0
ファイル: report_post.php プロジェクト: rjdesign/Ilch-1.2
                $fromUser = $_SESSION["authid"];
            } else {
                $fromUser = 0;
            }
            $tpl->set("NAME", get_n($fromUser));
            $tpl->set("BEITRAG", get_topic_title($topicId));
            $tpl->set("PID", $postId);
            $tpl->set("TID", $topicId);
            sendpm($fromUser, 1, $tpl->get("pm_betreff"), $tpl->get("pm_content"), 0);
            // weiterleitung
            wd("index.php?forum-showposts-" . $topicId, $tpl->get("weiterleitung"));
        } else {
            // An die Mods schicken
            foreach ($getmodids as $userid) {
                if (isset($_SESSION["authid"])) {
                    $fromUser = $_SESSION["authid"];
                } else {
                    $fromUser = 0;
                }
                $tpl->set("NAME", get_n($fromUser));
                $tpl->set("BEITRAG", get_topic_title($topicId));
                $tpl->set("PID", $postId);
                $tpl->set("TID", $topicId);
                sendpm($fromUser, $userid, $tpl->get("pm_betreff"), $tpl->get("pm_content"), 0);
                // weiterleitung
                wd("index.php?forum-showposts-" . $topicId, $tpl->get("weiterleitung"));
            }
        }
    }
}
$design->footer();
コード例 #4
0
ファイル: shbox4admin.php プロジェクト: NachtWolf82/ShBox
    $url = 'farben';
    $ar = array('GASTNAME' => $var->check_var('ngast', 'Name Gäste', $row['ngast'], $url), 'GASTTEXT' => $var->check_var('tgast', 'Text Gäste', $row['tgast'], $url), 'USERNAME' => $var->check_var('nuser', 'Name User', $row['nuser'], $url), 'USERTEXT' => $var->check_var('tuser', 'Text User', $row['tuser'], $url), 'ADMINNAME' => $var->check_var('nadmin', 'Name Admin', $row['nadmin'], $url), 'ADMINTEXT' => $var->check_var('tadmin', 'Text Admin', $row['tadmin'], $url), 'NGAST' => $var->shfarben($var->shconfig('ngast'), 'Farbe: Name der Gäste', 'fngast', $row['fngast'], $url, 0), 'TGAST' => $var->shfarben($var->shconfig('tgast'), 'Farbe:Text der Gäste', 'ftgast', $row['ftgast'], $url, 0), 'NUSER' => $var->shfarben($var->shconfig('nuser'), 'Farbe:Name der User', 'fnuser', $row['fnuser'], $url, 0), 'TUSER' => $var->shfarben($var->shconfig('tuser'), 'Farbe:Text der User', 'ftuser', $row['ftuser'], $url, 0), 'NADMIN' => $var->shfarben($var->shconfig('nadmin'), 'Farbe:Name der Admins', 'fnadmin', $row['fnadmin'], $url, 0), 'TADMIN' => $var->shfarben($var->shconfig('tadmin'), 'Farbe:Text der Admins', 'ftadmin', $row['ftadmin'], $url, 0));
    $tpl->set_ar_out($ar, 2);
}
if (escape($menu->get(1), 'string') == 'style') {
    $erg = db_query('SELECT * FROM `prefix_shbox4config` WHERE id = "1"');
    $row = db_fetch_assoc($erg);
    $url = 'style';
    $ar = array('AUSRICHTUNG' => $var->check_var('ausr', 'Eigene Ausrichtung', $row['ausr'], $url), 'HINTERGRUND' => $var->check_var('hgrund', 'Eigener Hintergrund', $row['hgrund'], $url), 'BBREITE' => $var->shfarben($var->shconfig('ausr'), 'Breite der Box in %', 'bbreite', $row['bbreite'], $url, 1), 'BAUS' => $var->shfarben($var->shconfig('ausr'), 'Ausrichtung der Box', 'baus', $row['baus'], $url, 2), 'HFNAME' => $var->shfarben($var->shconfig('hgrund'), 'Hintergrundfarbe vom Namen', 'hfname', $row['hfname'], $url, 0), 'HFTEXT' => $var->shfarben($var->shconfig('hgrund'), 'Hintergrundfarbe vom Text', 'hftext', $row['hftext'], $url, 0), 'HFINPUT' => $var->shfarben($var->shconfig('hgrund'), 'Hintergrundfarbe vom Eingabefeld', 'hfinput', $row['hfinput'], $url, 0));
    $tpl->set_ar_out($ar, 3);
}
if (escape($menu->get(1), 'string') == 'show' || escape($menu->get(1), 'string') == '') {
    $tpl->out(4);
    $erg = db_query('SELECT * FROM `prefix_shbox4` ORDER BY `id` DESC');
    while ($row = db_fetch_assoc($erg)) {
        $ar = array('ID' => $row['id'], 'NAME' => $var->colorname($var->sh_usercheck($row['uid']), get_n($row['uid'])), 'TEXTNOBB' => $row['txt'], 'TEXT' => BBcode(substr($row['txt'], 0, 70)));
        $tpl->set_ar_out($ar, 5);
    }
    $tpl->out(6);
}
/*
    function showedit($gid) {
       $ed  = db_query('SELECT * FROM `prefix_shbox4` WHERE `id` = "' . $gid . '"');
       $e   = db_fetch_assoc($ed);
       return '<form action="?shbox4admin-show-send-'.$gid.'" method="POST">
             <tr>
              <td style="background-color:#FF0000">' . $e['id'] . '</td>
              <td style="background-color:#FF0000">' . get_n($e['uid']) . '</td>
              <td style="background-color: #FF0000">' . date ('d.m.Y - H:i:s', $e['time'] ) . '</td>
              <td style="background-color:#FF0000"><textarea name="edittxt" rows="2" cols="50" wrap="virtual">' . $e['txt'] . '</textarea></td>
              <td style="background-color: #FF0000" align="center"><input name="subedit" type="submit" value="ändern" /></td>
コード例 #5
0
ファイル: shbox4class.php プロジェクト: NachtWolf82/ShBox
 function shdate($time, $uid)
 {
     if ($this->shconfig('datum') == '1') {
         return '<a href="?user-details-' . $uid . '" style="text-decoration: none;" onmouseout="hideTooltip()" onmouseover="showTooltip(event,\'' . date($this->shconfig(format), $time) . '\') ;return false">' . $this->colorname($this->sh_usercheck($uid), get_n($uid)) . '</a>:';
     } else {
         return '<a href="?user-details-' . $uid . '" style="text-decoration: none;" onmouseout="hideTooltip()">' . $this->colorname($this->sh_usercheck($uid), get_n($uid)) . '</a>:';
     }
 }