Beispiel #1
0
}
$class = 'Cmite';
$tpl = new tpl('forum/showpost');
$ar = array('SITELINK' => $MPL, 'tid' => $tid, 'ANTWORTEN' => $antworten, 'TOPICNAME' => $aktTopicRow['name']);
$tpl->set_ar_out($ar, 0);
$i = $anfang + 1;
$ges_ar = array('wurstegal', 'maennlich', 'weiblich');
$erg = db_query("SELECT `geschlecht`, `prefix_posts`.`id`,`txt`,`time`,`erstid`,`erst`,`sig`,`avatar`,`posts`,`prefix_user`.`sperre` FROM `prefix_posts` LEFT JOIN `prefix_user` ON `prefix_posts`.`erstid` = `prefix_user`.`id` WHERE `tid` = " . $tid . " ORDER BY `time` LIMIT " . $anfang . "," . $limit);
while ($row = db_fetch_assoc($erg)) {
    $class = $class == 'Cnorm' ? 'Cmite' : 'Cnorm';
    // define some vars.
    $row['sig'] = empty($row['sig']) ? '' : '<br /><hr style="width: 50%;" align="left">' . bbcode($row['sig']);
    $row['TID'] = $tid;
    $row['class'] = $class;
    //$row[ 'date' ] = date('d.m.Y - H:i:s', $row[ 'time' ]);
    $row['date'] = post_date($row['time'], 1);
    $row['delete'] = '';
    $row['change'] = '';
    if ($row['sperre'] == 1) {
        $row['sperre'] = '<br /><strong>gesperrt</strong>';
    } else {
        $row['sperre'] = '';
    }
    if (!is_numeric($row['geschlecht'])) {
        $row['geschlecht'] = 0;
    }
    if (file_exists($row['avatar'])) {
        $row['avatar'] = '<br /><br /><img src="' . $row['avatar'] . '" alt="User Pic" border="0" /><br />';
    } elseif ($allgAr['forum_default_avatar']) {
        $row['avatar'] = '<br /><br /><img src="include/images/avatars/' . $ges_ar[$row['geschlecht']] . '.jpg" alt="User Pic" border="0" /><br />';
    } else {
    ?>
</a></td>
					<td><?php 
    post_author();
    ?>
</td>
					<td><?php 
    post_category();
    ?>
</td>
					<td><?php 
    post_comment();
    ?>
</td>
					<td><?php 
    post_date();
    ?>
</td>
				</tr>
			<?php 
    $i++;
}
?>
			</tbody>
		</table>
		<?php 
$nav = post_nav(FALSE);
if ($nav) {
    if ($nav['totalPage'] <= 20) {
        ?>
		<div class="nav">
    post_title();
    ?>
</a></h2>
			<p class="entry_data">
				<span><?php 
    _e('Author');
    ?>
:<?php 
    post_author();
    ?>
</span>
				<span><?php 
    _e('Date');
    ?>
:<?php 
    post_date('F j, Y');
    ?>
</span>
				<span><?php 
    _e('Category');
    ?>
:<?php 
    post_category(',');
    ?>
</span>
				<a href="<?php 
    post_link();
    ?>
#comments"><?php 
    post_comment('No Comments', '1 Comment', '%d Comments');
    ?>
Beispiel #4
0
    <div class="sidebar">
      <ul>
        <li><?php 
post_author();
?>
, <?php 
post_date('j. F Y');
?>
</li>
      </ul>
    </div>
Beispiel #5
0
        $tpl = new tpl('news.htm');
        if (loggedin()) {
            $uname = $_SESSION['authname'];
            $readonly = 'readonly';
        } else {
            $uname = '';
            $readonly = '';
        }
        $ar = array('TEXT' => $textToShow, 'KATE' => $kategorie, 'NID' => $nid, 'uname' => $uname, 'readonly' => $readonly, 'ANTISPAM' => get_antispam('newskom', 0), 'NAME' => $row->news_title);
        $tpl->set_ar_out($ar, 2);
        if ($komsOK) {
            $tpl->set_ar_out(array('NAME' => $row->news_title, 'NID' => $nid), "koms_on");
            $erg1 = db_query("SELECT `text`, `name`, `userid`, `id`, `time` FROM `prefix_koms` WHERE `uid` = " . $nid . " AND `cat` = 'NEWS' ORDER BY `id` DESC");
            $anz = db_num_rows($erg1);
            if ($anz == 0) {
                echo $lang['nocomments'];
            } else {
                while ($row1 = db_fetch_assoc($erg1)) {
                    $row1['text'] = bbcode(trim($row1['text']));
                    if (has_right(-7, 'news')) {
                        $del = ' <a href="?news-' . $nid . '-d' . $row1['id'] . '"><img src="include/images/icons/del.gif" alt="l&ouml;schen" border="0" title="l&ouml;schen" /></a>';
                    }
                    $tpl->set_ar_out(array('TEXT' => $row1['text'], 'AVATAR' => get_avatar($row1['userid']), 'NAME' => $row1['name'], 'TIME' => post_date($row1['time'], 1) . $del, 'ZAHL' => $anz), "koms_self");
                    $anz--;
                }
            }
            $tpl->out("koms_off");
        }
    }
}
$design->footer();
Beispiel #6
0
        $MPL = db_make_sites($page, "", $limit, "?gbook", 'gbook');
        $anfang = ($page - 1) * $limit;
        $tpl = new tpl('gbook.htm');
        $ei1 = @db_query("SELECT COUNT(ID) FROM `prefix_gbook`");
        $ein = @db_result($ei1, 0);
        $ar = array('EINTRAGE' => $ein);
        $tpl->set_ar_out($ar, 0);
        $erg = db_query("SELECT * FROM `prefix_gbook` ORDER BY `time` DESC LIMIT " . $anfang . "," . $limit) or die(db_error());
        while ($row = db_fetch_object($erg)) {
            $page = '';
            $mail = '';
            if ($row->page) {
                $row->page = get_homepage($row->page);
                $page = ' &nbsp; <a href="' . $row->page . '" target="_blank"><img src="include/images/icons/page.gif" border="0" alt="Homepage ' . $lang['from'] . ' ' . $row->name . '"></a>';
            }
            if ($row->mail) {
                $mail = ' &nbsp; <a href="mailto:' . escape_email_to_show($row->mail) . '"><img src="include/images/icons/mail.gif" border="0" alt="E-Mail ' . $lang['from'] . ' ' . $row->name . '"></a>';
            }
            $koms = '';
            if ($komsOK) {
                $koms = db_result(db_query("SELECT COUNT(*) FROM `prefix_koms` WHERE `uid` = " . $row->id . " AND `cat` = 'GBOOK'"), 0, 0);
                $koms = '<a href="index.php?gbook-show-' . $row->id . '">' . $koms . ' ' . $lang['comments'] . '</a>';
            }
            $ar = array('NAME' => $row->name, 'DATE' => post_date($row->time), 'koms' => $koms, 'MAIL' => $mail, 'ID' => $row->id, 'PAGE' => $page, 'TEXT' => BBCode($row->txt));
            $tpl->set_ar_out($ar, 1);
        }
        $tpl->set_out('SITELINK', $MPL, 2);
        break;
}
// -----------------------------------------------------------|
$design->footer();
Beispiel #7
0
             $r['readonly'] = '';
         }
         $r['text'] = bbcode($r['text']);
         $tpl->set_ar_out($r, "koms_on");
         $erg = db_query("SELECT `id`, `name`, `userid`, `text`, `time` FROM `prefix_koms` WHERE `uid` = " . $id . " AND `cat` = 'DOWNLOAD' ORDER BY `id` DESC");
         $anz = db_num_rows($erg);
         if ($anz == 0) {
             echo $lang['nocomments'];
         } else {
             while ($r1 = db_fetch_assoc($erg)) {
                 if (has_right(-7, 'downloads')) {
                     $del = ' <a href="index.php?downloads-show-' . $id . '-d' . $r1['id'] . '"><img src="include/images/icons/del.gif" alt="' . $lang['delete'] . '" border="0" title="' . $lang['delete'] . '" /></a>';
                 }
                 $r1['zahl'] = $anz;
                 $r1['avatar'] = get_avatar($r1['userid']);
                 $r1['time'] = post_date($r1['time'], 1) . $del;
                 $r1['text'] = bbcode($r1['text']);
                 $tpl->set_ar_out($r1, "koms_self");
                 $anz--;
             }
         }
     }
     $tpl->out("koms_off");
     $design->footer();
     break;
 case 'down':
     $fid = intval($menu->get(2));
     $erg = db_query("SELECT `drecht` FROM `prefix_downloads` LEFT JOIN `prefix_downcats` ON `prefix_downcats`.`id` = `prefix_downloads`.`cat` WHERE `prefix_downloads`.`id` = " . $fid . " AND (" . $_SESSION['authright'] . " <= `prefix_downloads`.`drecht` OR (`prefix_downloads`.`cat` = 0 AND `prefix_downcats`.`recht` = 0))");
     if (@db_num_rows($erg) != 1) {
         $title = $allgAr['title'] . ' :: Downloads ';
         $hmenu = '<a class="smalfont" href="?downloads">Downloads</a>';
Beispiel #8
0
if ($forum_rights['start'] == true) {
    $tpl->set('NEWTOPIC', '<b>[ <a href="index.php?forum-newtopic-' . $fid . '">' . $lang['newtopic'] . '</a> ]</b>');
} else {
    $tpl->set('NEWTOPIC', '');
}
$tpl->set('MPL', $MPL);
$tpl->set_out('FID', $fid, 0);
$q = "SELECT `a`.`id`, `a`.`name`, `a`.`rep`, `a`.`erst`, `a`.`hit`, `a`.`art`, `a`.`stat`, `b`.`time`, `b`.`erst` as `last`, `b`.`id` as `pid`\r\n\tFROM `prefix_topics` `a`\r\n\tLEFT JOIN `prefix_posts` `b` ON `a`.`last_post_id` = `b`.`id`\r\n\tWHERE `a`.`fid` = {$fid}\r\n\tORDER BY `a`.`art` DESC, `b`.`time` DESC\r\n\tLIMIT " . $anfang . "," . $limit;
$erg = db_query($q);
if (db_num_rows($erg) > 0) {
    while ($row = db_fetch_assoc($erg)) {
        if ($row['stat'] == 0) {
            $row['ORD'] = 'cord';
        } else {
            // $row['ORD'] = get_ordner($row['time']);
            $row['ORD'] = forum_get_ordner($row['time'], $row['id'], $fid);
        }
        $row['datum'] = post_date($row['time']);
        $row['page'] = ceil(($row['rep'] + 1) / $allgAr['Fpanz']);
        $row['VORT'] = $row['art'] == 1 ? 'Fest: ' : '';
        $tpl->set_ar_out($row, 1);
    }
} else {
    echo '<tr><td colspan="6" class="Cnorm"><b>keine Eintr&auml;ge vorhanden</b></td></tr>';
}
$tpl->out(2);
if ($forum_rights['mods'] == true) {
    $tpl->set('id', $fid);
    $tpl->out(3);
}
$design->footer();
Beispiel #9
0
            $fancylink = 'id="fancyframecomment"';
            $link = 'index.php?gallery-show-' . $cid . '-p' . $anz;
        }
        if ($row->categorie == 'GBOOK') {
            $kat = 'Gbook';
            $link = 'index.php?gbook-show-' . $row->uid;
        }
        if ($row->categorie == 'NEWS') {
            $kat = 'News';
            $link = 'index.php?news-' . $row->uid;
        }
        if ($row->categorie == 'DOWNLOAD') {
            $kat = 'Download';
            $link = 'index.php?downloads-show-' . $row->uid;
        }
        if ($row->categorie == 'WARSLAST') {
            $kat = 'Wars';
            $link = 'index.php?wars-more-' . $row->uid;
        }
        echo '<tr>
				   <td><b> &raquo; </b></td>
				   <td>
				     <a class="box" ' . $fancylink . ' href="' . $link . '" title="' . post_date($row->time, 1) . '">
					   ' . (strlen($row->text) < $info ? $row->text : substr($row->text, 0, $info - 3) . '...') . '
					 </a><br>
					 <span class="smalfont">' . $kat . ' // ' . $row->name . '</span>
				   </td>
				</tr>';
    }
}
echo '</table>';
Beispiel #10
0
 $xoopsTpl->assign('print_allow', $xoopsModuleConfig['allowprintable']);
 //
 $xoopsTpl->assign('show_art_reads', $xoopsModuleConfig['showartreads']);
 // show number of times article read
 $xoopsTpl->assign('show_art_posted', $xoopsModuleConfig['showartposted']);
 // show when published
 $xoopsTpl->assign('show_art_poster', $xoopsModuleConfig['showartposter']);
 // show article's publisher
 $article = array();
 $article['id'] = $myrow['id'];
 $article['art_author_id'] = $myrow['art_author_id'];
 $article['art_author_name'] = XoopsUser::getUnameFromId($myrow['art_author_id'], 0);
 // later add realname option - http://www.xoops.org/misc/api/kernel/XoopsUser.html#getUnameFromId
 $article['article_title'] = $myts->htmlSpecialChars($myts->stripSlashesGPC($myrow['art_title']));
 $article['art_views'] = $myrow['art_views'];
 $article['art_posted_datetime'] = post_date($myrow['art_posted_datetime'], $xoopsModuleConfig['dateformat']);
 //
 if (isset($_GET['page'])) {
     $page = $_GET['page'];
 } else {
     $page = "";
 }
 $content = $myrow['art_article_text'];
 // Based on pagebreak in original Sections module
 // Rip the article into pages. Delimiter string is "[pagebreak]"
 $contentpages = explode("[pagebreak]", $content);
 $pageno = count($contentpages);
 /* Define the current page	*/
 if ($page == "" || $page < 1) {
     $page = 1;
 }
Beispiel #11
0
function kalender_listoutput()
{
    global $komsOK, $tpl, $eid, $data, $data_id, $gday, $month, $year, $days, $arr_day, $title_liste, $view, $allgAr;
    //Listbegin
    $tpl->set_ar_out(array('TITLE' => $eid ? $data_id[$eid]['title'] : $title_liste, 'TITLE_ALIGN' => $eid ? '' : ' align="center"'), "listbegin");
    //Detail
    if ($eid) {
        $aus['display'] = 'style="display:none"';
        $aus['DETAIL_DATE'] = date('d.m.Y', $data_id[$eid]['time']);
        $aus['DETAIL_TIME'] = date('H:i', $data_id[$eid]['time']);
        $aus['DETAIL_TEXT'] = BBcode($data_id[$eid]['text']);
        $aus['ID'] = $eid;
        $viewl = $allgAr['kalender_standard_list'];
        if (preg_match('%\\?kalender-v([0|1])%i', $_SERVER['HTTP_REFERER'], $match)) {
            $viewl = $match[1];
        }
        $aus['BACK_LINK'] = 'index.php?kalender-v' . $viewl . '-m' . date('m', $data_id[$eid]['time']) . '-y' . date('Y', $data_id[$eid]['time']);
        if (!$komsOK) {
            $tpl->set_ar_out($aus, 'detail');
        } else {
            if ((loggedin() or chk_antispam('kalender_komms')) and $komsOK and !empty($_POST['name']) and !empty($_POST['text'])) {
                if (loggedin()) {
                    $name = $_SESSION['authname'];
                    $userid = $_SESSION['authid'];
                } else {
                    $name = escape($_POST['name'], 'string') . ' (Gast)';
                    $userid = 0;
                }
                $text = escape($_POST['text'], 'string');
                db_query("INSERT INTO `prefix_koms` (`name`,`userid`,`text`,`time`,`uid`,`cat`) VALUES ('" . $name . "', " . $userid . ", '" . $text . "','" . time() . "', " . $eid . ", 'KALENDER')");
            }
            if (loggedin()) {
                $aus['uname'] = $_SESSION['authname'];
                $aus['readonly'] = 'readonly';
            } else {
                $aus['uname'] = '';
                $aus['readonly'] = '';
            }
            $aus['ANTISPAM'] = get_antispam('kalenderkom', 0);
            $aus['text'] = bbcode($aus['text']);
            $tpl->set_ar_out($aus, 'detail');
            $tpl->set_ar_out($aus, 'commentstart');
            $erg = db_query("SELECT `id`, `name`, `userid`, `text`, `time` FROM `prefix_koms` WHERE `uid` = " . $eid . " AND `cat` = 'KALENDER' ORDER BY `id` DESC");
            $anz = db_num_rows($erg);
            if ($anz == 0) {
                echo 'Keine Kommentare vorhanden';
            } else {
                while ($r1 = db_fetch_assoc($erg)) {
                    if (has_right(-7, 'kalender')) {
                        $del = ' <a href="index.php?kalender-v1-e' . $eid . '-d' . $r1['id'] . '"><img src="include/images/icons/del.gif" alt="l&ouml;schen" border="0" title="l&ouml;schen" /></a>';
                    }
                    $r1['zahl'] = $anz;
                    $r1['avatar'] = get_avatar($r1['userid']);
                    $r1['time'] = post_date($r1['time'], 1) . $del;
                    $r1['text'] = bbcode($r1['text']);
                    $tpl->set_ar_out($r1, 'comments');
                    $anz--;
                }
            }
        }
        $tpl->out('commentend');
        // Kommentare Ende
    } elseif ($view == 0) {
        for ($i = 0; $i < $days; $i++) {
            $date = mktime(0, 0, 0, $month, $i + 1, $year);
            $text = '';
            if (isset($data[$date])) {
                foreach ($data[$date] as $eventinfo) {
                    $text .= eventlink($tpl, $view, $eventinfo);
                    // bbcode anwenden
                    $eventinfo["text"] = BBCode($eventinfo["text"]);
                    $tooltips .= $tpl->set_ar_get($eventinfo, "tooltip");
                }
            }
            $aus['LIST_I'] = $i + 1;
            $aus['LIST_D'] = $arr_day[date('w', mktime(0, 0, 0, $month, $i + 1, $year))];
            $aus['LIST_T'] = $text;
            $class = $i % 2 ? 'Cnorm' : 'Cmite';
            $aus['LIST_CLASS'] = $i + 1 == date('j') && $month == date('n') && $year == date('Y') ? 'Cdark' : $class;
            $tpl->set_ar_out($aus, 'listitem');
            unset($aus);
        }
        showTooltips($tpl, $tooltips);
    } elseif ($view == 1) {
        // Nur ein Tag
        if (isset($data) && !empty($gday)) {
            $date = mktime(0, 0, 0, $month, $gday, $year);
            $i = 1;
            $tooltips = '';
            if (isset($data[$date])) {
                foreach ($data[$date] as $eventinfo) {
                    $text = '';
                    $text .= eventlink($tpl, $view, $eventinfo);
                    $aus['LIST_I'] = $arr_day[date('w', $date)];
                    $aus['LIST_D'] = date('H:i', $eventinfo['time']);
                    $aus['LIST_T'] = $text;
                    $class = $i % 2 ? 'Cnorm' : 'Cmite';
                    $aus['LIST_CLASS'] = $i + 1 == date('j') && $month == date('n') && $year == date('Y') ? 'Cdark' : $class;
                    $tpl->set_ar_out($aus, 'listitem');
                    unset($aus);
                    $i++;
                    // bbcode anwenden
                    $eventinfo["text"] = BBCode($eventinfo["text"]);
                    $tooltips .= $tpl->set_ar_get($eventinfo, "tooltip");
                }
            }
            showTooltips($tpl, $tooltips);
            // Ganze Liste
        } elseif (isset($data)) {
            $i = 1;
            foreach ($data as $date => $data1) {
                $text = '';
                foreach ($data1 as $eventinfo) {
                    $text .= eventlink($tpl, $view, $eventinfo);
                }
                $aus['LIST_I'] = date('d.m.Y', $date);
                $aus['LIST_D'] = $arr_day[date('w', $date)];
                $aus['LIST_T'] = $text;
                $class = $i % 2 ? 'Cnorm' : 'Cmite';
                $aus['LIST_CLASS'] = $i + 1 == date('j') && $month == date('n') && $year == date('Y') ? 'Cdark' : $class;
                $tpl->set_ar_out($aus, 'listitem');
                unset($aus);
                $i++;
                // bbcode anwenden
                $eventinfo["text"] = BBCode($eventinfo["text"]);
                $tooltips .= $tpl->set_ar_get($eventinfo, "tooltip");
            }
            showTooltips($tpl, $tooltips);
        } else {
            $aus['LIST_I'] = '-';
            $aus['LIST_D'] = '-';
            $aus['LIST_T'] = '-';
            $aus['LIST_CLASS'] = 'Cnorm';
            $tpl->set_ar_out($aus, 'listitem');
            unset($aus);
        }
    }
    $tpl->out('listend');
}
Beispiel #12
0
<table class="maintbl">
  <tr>
    <td>
    

<?php 
    $sql = "SELECT * FROM " . $xoopsDB->prefix("articles_main") . " WHERE id=" . $id . " AND art_validated=1 AND art_showme=1 ORDER BY id LIMIT 1";
    $result = $xoopsDB->query($sql);
    while ($myrow = $xoopsDB->fetchArray($result)) {
        //$article 	= array();
        $article_id = $myrow['id'];
        $article_title = $myts->htmlSpecialChars($myts->stripSlashesGPC($myrow['art_title']));
        $article_description = $myts->displayTarea($myrow['art_description'], $myrow['art_nohtml'], $myrow['art_nosmiley'], $myrow['art_noxcode'], $myrow['art_noimage'], $myrow['art_nobr']);
        // fetch config switches for article display
        $article_text = $myts->displayTarea($myrow['art_article_text'], $myrow['art_nohtml'], $myrow['art_nosmiley'], $myrow['art_noxcode'], $myrow['art_noimage'], $myrow['art_nobr']);
        $posted = post_date($myrow['art_posted_datetime'], $xoopsModuleConfig['dateformatprint']);
        // strip [pagebreak] tags - not needed in printable version
        $article_text = str_replace("[pagebreak]", " ", $article_text);
        ?>
	
	
<table border="0">
  <tr>
    <td><strong><?php 
        echo _MD_ARTPRINTTITLE;
        ?>
</strong> &nbsp;</td>
    <td><?php 
        echo $article_title;
        ?>
</td>