Beispiel #1
0
 public function testStorage()
 {
     toggleConfig(new Storage());
     $this->assertTrue(toggle('foo'));
     $this->assertFalse(toggle('bar'));
     $this->assertFalse(toggle('baz'));
 }
function topRight($e = "index_e.php", $d = "index.php", $c = "index_ch.php")
{
    $ret = '<div class="row">
           <div class="col-sm-2">' . langs($e, $d, $c) . '</div>';
    $ret .= '<div class="col-sm-8 col-8 col-lg-8 col-md-8"><h1>William Cuthbertson</h1></div>';
    $ret .= '<div class="col-sm-2 col-2 col-md-2 col-lg-2 tog" >' . toggle() . '</div>
          </div>';
    $ret .= "<a id='top'></a>";
    print $ret;
}
Beispiel #3
0
 public function testToggleCallback()
 {
     $features = ['foo' => function (array $data) {
         return $data['value'] === 123;
     }, 'bar' => function ($a, $b) {
         return $a + $b === 10;
     }];
     toggleConfig($features);
     // Call all these function twice to check that it is memoized correctly
     $this->assertTrue(toggle('foo', [['value' => 123]]));
     $this->assertTrue(toggle('foo', [['value' => 123]]));
     $this->assertFalse(toggle('foo', [['value' => 456]]));
     $this->assertFalse(toggle('foo', [['value' => 456]]));
     $this->assertTrue(toggle('bar', [5, 5]));
     $this->assertTrue(toggle('bar', [5, 5]));
     $this->assertFalse(toggle('bar', [1, 2]));
     $this->assertFalse(toggle('bar', [1, 2]));
 }
   } elseif ($homescr < $oppscr) {
       $results_1 = '<font color="' . $loosecolor . '">' . $homescr . '</font>';
       $results_2 = '<font color="' . $wincolor . '">' . $oppscr . '</font>';
   } else {
       $results_1 = '<font color="' . $drawcolor . '">' . $homescr . '</font>';
       $results_2 = '<font color="' . $drawcolor . '">' . $oppscr . '</font>';
   }
   if (isclanwaradmin($userID)) {
       $adminaction = '<input type="button" style="margin-top:50px;" onclick="MM_openBrWindow(\'upload.php?cwID=' . $cwID . '\',\'Clanwars\',\'toolbar=no,status=no,scrollbars=yes,width=800,height=600\')" value="' . $_language->module['upload_screenshot'] . '" />
 <input type="button" onclick="MM_openBrWindow(\'clanwars.php?action=edit&amp;cwID=' . $ds['cwID'] . '\',\'Clanwars\',\'toolbar=no,status=no,scrollbars=yes,width=800,height=600\')" value="' . $_language->module['edit'] . '" />
 <input type="button" onclick="MM_confirm(\'' . $_language->module['really_delete_clanwar'] . '?\',\'clanwars.php?action=delete&amp;cwID=' . $ds['cwID'] . '\')" value="' . $_language->module['delete'] . '" />';
   } else {
       $adminaction = '';
   }
   $report = cleartext($ds['report']);
   $report = toggle($report, $ds['cwID']);
   if ($report == "") {
       $report = "No Details Available.";
   }
   $squad = '' . getsquadname($ds['squad']) . '';
   $opptag = getinput($ds['opptag']);
   $oppteam = getinput($ds['oppteam']);
   $server = getinput($ds['server']);
   $hltv = getinput($ds['hltv']);
   if (!empty($ds['hometeam'])) {
       $array = unserialize($ds['hometeam']);
       $n = 1;
       foreach ($array as $id) {
           if (!empty($id)) {
               if ($n > 1) {
                   $hometeam .= ', <a href="index.php?site=profile&amp;id=' . $id . '">' . getnickname($id) . '</a>';
Beispiel #5
0
									<?php 
    echo toggle('has_menu');
    ?>
									<p class="desc">Allow users to add/remove pages to your theme with ease.</p>
								</li>
								<li id="widget">
									<span class="title">Widget Area</span>
									<?php 
    echo toggle('has_widget');
    ?>
									<p class="desc">A blank canvas</p>
								</li>
								<li id="custom_post_type">
									<span class="title">Custom Post Type</span>
									<?php 
    echo toggle('has_custom_post_type');
    ?>
									<p class="desc">When posts and pages just won't cut it.</p>
								</li>
							</ul>


							<?php 
} else {
    ?>
							
 							<ul class="grid">
								<li class="first" id="menu">
									<p>Custom Menu</p>
									<label class="icon">
										<input type="checkbox" name="has_menu">
Beispiel #6
0
             $n++;
         }
     } else {
         echo '<tr bgcolor="' . BG_1 . '"><td colspan="4">' . $_language->module['no_outgoing'] . '</td></tr>';
     }
     eval("\$pm_outgoing_foot = \"" . gettemplate("pm_outgoing_foot") . "\";");
     echo $pm_outgoing_foot;
 } elseif ($action == "show") {
     $id = (int) $_GET['id'];
     $ds = mysql_fetch_array(safe_query("SELECT * FROM " . PREFIX . "messenger WHERE messageID='" . $id . "' AND userID='" . $userID . "'"));
     if ($ds['touser'] == $userID or $ds['fromuser'] == $userID) {
         safe_query("UPDATE " . PREFIX . "messenger SET viewed='1' WHERE messageID='{$id}'");
         $date = date("d.m.Y - H:i", $ds['date']);
         $sender = '<a href="index.php?site=profile&amp;id=' . $ds['fromuser'] . '"><b>' . getnickname($ds['fromuser']) . '</b></a>';
         $message = cleartext($ds['message']);
         $message = toggle($message, $ds['messageID']);
         $title = clearfromtags($ds['title']);
         $bg1 = BG_1;
         eval("\$pm_show = \"" . gettemplate("pm_show") . "\";");
         echo $pm_show;
     } else {
         redirect('index.php?site=messenger', '', 0);
     }
 } elseif ($action == "touser") {
     $touser = $_GET['touser'];
     $_language->read_module('bbcode', true);
     $tousernick = getnickname($touser);
     $touser = getforminput($touser);
     $bg1 = BG_1;
     eval("\$addbbcode = \"" . gettemplate("addbbcode") . "\";");
     eval("\$pm_new_touser = \"" . gettemplate("pm_new_touser") . "\";");
Beispiel #7
0
				$headline = $ds [headline1];
			
			if ($ds [content2])
				$content = $ds [content2];
			else
				$content = '[b]no version in selected language available![/b].[br][br]' . $ds [content1];
			
			if ($ds [headline1]) {
				$langs = '<a href="index.php?site=news_comments&newsID=' . $ds [newsID] . '&lang=' . $ds [lang1] . '">' . $language1 . '</a>';
				$language = getlanguage ( $ds [lang1] );
				$langs = eregi_replace ( '(alt=")(.*)(")', "\\1 News in $language\\3", $langs );
			} else
				$langs = '';
		}
		$content = cleartext ( $content );
		$content = toggle ( $content, $ds [newsID] );
		$poster = '' . getnickname ( $ds [poster] ) . '';
		if ($ds [link1] && $ds [url1] != "http://" && $ds [window1])
			$related .= '&#8226; <a href="' . $ds [url1] . '" target="_blank">' . $ds [link1] . '</a><br> ';
		if ($ds [link1] && $ds [url1] != "http://" && ! $ds [window1])
			$related .= '&#8226; <a href="' . $ds [url1] . '">' . $ds [link1] . '</a><br> ';
		
		if ($ds [link2] && $ds [url2] != "http://" && $ds [window2])
			$related .= '&#8226; <a href="' . $ds [url2] . '" target="_blank">' . $ds [link2] . '</a><br> ';
		if ($ds [link2] && $ds [url2] != "http://" && ! $ds [window2])
			$related .= '&#8226; <a href="' . $ds [url2] . '">' . $ds [link2] . '</a><br> ';
		
		if ($ds [link3] && $ds [url3] != "http://" && $ds [window3])
			$related .= '&#8226; <a href="' . $ds [url3] . '" target="_blank">' . $ds [link3] . '</a><br> ';
		if ($ds [link3] && $ds [url3] != "http://" && ! $ds [window3])
			$related .= '&#8226; <a href="' . $ds [url3] . '">' . $ds [link3] . '</a><br> ';
Beispiel #8
0
function print_termine($tag, $month, $year)
{
    global $wincolor;
    global $loosecolor;
    global $drawcolor;
    global $userID;
    global $_language;
    $_language->read_module('calendar');
    $pagebg = PAGEBG;
    $border = BORDER;
    $bghead = BGHEAD;
    $bgcat = BGCAT;
    $start_date = mktime(0, 0, 0, $month, $tag, $year);
    $end_date = mktime(23, 59, 59, $month, $tag, $year);
    unset($termin);
    $ergebnis = safe_query("SELECT * FROM " . PREFIX . "upcoming");
    $anz = mysql_num_rows($ergebnis);
    if ($anz) {
        while ($ds = mysql_fetch_array($ergebnis)) {
            if ($ds['type'] == "c") {
                if ($ds['date'] >= $start_date && $ds['date'] <= $end_date) {
                    $date = date("d.m.Y", $ds['date']);
                    $time = date("H:i", $ds['date']);
                    $squad = getsquadname($ds['squad']);
                    $oppcountry = "[flag]" . $ds['oppcountry'] . "[/flag]";
                    $oppcountry = flags($oppcountry);
                    $opponent = $oppcountry . ' <a href="' . $ds['opphp'] . '" target="_blank">' . clearfromtags($ds['opptag']) . ' / ' . clearfromtags($ds['opponent']) . '</a>';
                    $maps = clearfromtags($ds['maps']);
                    $server = clearfromtags($ds['server']);
                    $league = '<a href="' . $ds['leaguehp'] . '" target="_blank">' . clearfromtags($ds['league']) . '</a>';
                    if (isclanmember($userID)) {
                        $warinfo = cleartext($ds['warinfo']);
                    } else {
                        $warinfo = $_language->module['you_have_to_be_clanmember'];
                    }
                    $players = "";
                    $announce = "";
                    $adminaction = '';
                    if (isclanmember($userID) or isanyadmin($userID)) {
                        $anmeldung = safe_query("SELECT * FROM " . PREFIX . "upcoming_announce WHERE upID='" . $ds['upID'] . "'");
                        if (mysql_num_rows($anmeldung)) {
                            $i = 1;
                            while ($da = mysql_fetch_array($anmeldung)) {
                                if ($da['status'] == "y") {
                                    $fontcolor = $wincolor;
                                } elseif ($da['status'] == "n") {
                                    $fontcolor = $loosecolor;
                                } else {
                                    $fontcolor = $drawcolor;
                                }
                                if ($i > 1) {
                                    $players .= ', <a href="index.php?site=profile&amp;id=' . $da['userID'] . '"><font color="' . $fontcolor . '">' . getnickname($da['userID']) . '</font></a>';
                                } else {
                                    $players .= '<a href="index.php?site=profile&amp;id=' . $da['userID'] . '"><font color="' . $fontcolor . '">' . getnickname($da['userID']) . '</font></a>';
                                }
                                $i++;
                            }
                        } else {
                            $players = $_language->module['no_announced'];
                        }
                        if (issquadmember($userID, $ds['squad']) and $ds['date'] > time()) {
                            $announce = '&#8226; <a href="index.php?site=calendar&amp;action=announce&amp;upID=' . $ds['upID'] . '">' . $_language->module['announce_here'] . '</a>';
                        } else {
                            $announce = "";
                        }
                        if (isclanwaradmin($userID)) {
                            $adminaction = '<div align="right">
            <input type="button" onclick="MM_openBrWindow(\'clanwars.php?action=new&amp;upID=' . $ds['upID'] . '\',\'Clanwars\',\'toolbar=no,status=no,scrollbars=yes,width=800,height=490\')" value="' . $_language->module['add_clanwars'] . '" />
            <input type="button" onclick="MM_goToURL(\'parent\',\'index.php?site=calendar&amp;action=editwar&amp;upID=' . $ds['upID'] . '\');return document.MM_returnValue" value="' . $_language->module['edit'] . '" />
            <input type="button" onclick="MM_confirm(\'' . $_language->module['really_delete'] . '\', \'calendar.php?action=delete&amp;upID=' . $ds['upID'] . '\')" value="' . $_language->module['delete'] . '" /></div>';
                        } else {
                            $adminaction = '';
                        }
                    } else {
                        $players = $_language->module['access_member'];
                    }
                    $bg1 = BG_1;
                    $bg2 = BG_2;
                    $bg3 = BG_3;
                    $bg4 = BG_4;
                    eval("\$upcoming_war_details = \"" . gettemplate("upcoming_war_details") . "\";");
                    echo $upcoming_war_details;
                }
            } else {
                if ($start_date <= $ds['date'] && $end_date >= $ds['date'] || $start_date >= $ds['date'] && $end_date <= $ds['enddate'] || $start_date <= $ds['enddate'] && $end_date >= $ds['enddate']) {
                    $date = date("d.m.Y", $ds['date']);
                    $time = date("H:i", $ds['date']);
                    $enddate = date("d.m.Y", $ds['enddate']);
                    $endtime = date("H:i", $ds['enddate']);
                    $title = clearfromtags($ds['title']);
                    $location = '<a href="' . $ds['locationhp'] . '" target="_blank">' . clearfromtags($ds['location']) . '</a>';
                    $dateinfo = cleartext($ds['dateinfo']);
                    $dateinfo = toggle($dateinfo, $ds['upID']);
                    $country = "[flag]" . $ds['country'] . "[/flag]";
                    $country = flags($country);
                    $players = "";
                    if (isclanmember($userID)) {
                        $anmeldung = safe_query("SELECT * FROM " . PREFIX . "upcoming_announce WHERE upID='" . $ds['upID'] . "'");
                        if (mysql_num_rows($anmeldung)) {
                            $i = 1;
                            while ($da = mysql_fetch_array($anmeldung)) {
                                if ($da['status'] == "y") {
                                    $fontcolor = $wincolor;
                                } elseif ($da['status'] == "n") {
                                    $fontcolor = $loosecolor;
                                } else {
                                    $fontcolor = $drawcolor;
                                }
                                if ($i > 1) {
                                    $players .= ', <a href="index.php?site=profile&amp;id=' . $da['userID'] . '"><font color="' . $fontcolor . '">' . getnickname($da['userID']) . '</font></a>';
                                } else {
                                    $players .= '<a href="index.php?site=profile&amp;id=' . $da['userID'] . '"><font color="' . $fontcolor . '">' . getnickname($da['userID']) . '</font></a>';
                                }
                                $i++;
                            }
                        } else {
                            $players = $_language->module['no_announced'];
                        }
                        if (isclanmember($userID) and $ds['date'] > time()) {
                            $announce = '&#8226; <a href="index.php?site=calendar&amp;action=announce&amp;upID=' . $ds['upID'] . '">' . $_language->module['announce_here'] . '</a>';
                        } else {
                            $announce = '';
                        }
                        if (isclanwaradmin($userID)) {
                            $adminaction = '<div align="right"><input type="button" onclick="MM_goToURL(\'parent\',\'index.php?site=calendar&amp;action=editdate&amp;upID=' . $ds['upID'] . '\');return document.MM_returnValue" value="' . $_language->module['edit'] . '" /><input type="button" onclick="MM_confirm(\'' . $_language->module['really_delete'] . '\', \'calendar.php?action=delete&amp;upID=' . $ds['upID'] . '\')" value="' . $_language->module['delete'] . '" /></div>';
                        } else {
                            $adminaction = '';
                        }
                    } else {
                        $players = $_language->module['access_member'];
                        $announce = '';
                        $adminaction = '';
                    }
                    $bg1 = BG_1;
                    $bg2 = BG_2;
                    $bg3 = BG_3;
                    $bg4 = BG_4;
                    eval("\$upcoming_date_details = \"" . gettemplate("upcoming_date_details") . "\";");
                    echo $upcoming_date_details;
                }
            }
        }
    } else {
        echo $_language->module['no_entries'];
    }
}
Beispiel #9
0
function facil_images($k, $url, $val)
{
    $ret .= btn('txtx', toggle('', 'bkg' . $k . '_dsnav_bkg_' . $k, 'backgrounds')) . ' ';
    if (strpos($val, ':url(/') !== false) {
        $ret .= lkc("txtred", $url . '&save_img=' . $k . '&erase_img==', 'delete_background');
    }
    $ret .= btd('bkg' . $k, '');
    $mnu_bkg = array('', "no-repeat", "repeat-x", "repeat-y", "repeat");
    $mnu_im_align = array('', "left", "right", "center");
    $mnu_im_valign = array('', "top", "bottom", "center");
    if (strpos($val, "background:url") !== false) {
        $t_ims = embed_detect($val, "background:url", ";", '');
    }
    list($urb, $reap, $fixd, $alg, $vlg) = explode(" ", $t_ims);
    if ($fixd) {
        $chk = ' checked';
    }
    if ($urb) {
        $urb = substr($urb, 1, -1);
        $ret .= lkt('txtx', $urb, 'open') . br();
    }
    $mnu .= select(atn('repeat'), $mnu_bkg, 'vv', $reap) . ' ';
    $mnu .= select(atn('align'), $mnu_im_align, 'vv', $alg) . ' ';
    $mnu .= select(atn('valign'), $mnu_im_valign, 'vv', $vlg) . ' ';
    $mnu .= checkbox('fixed', 'fixed', 'fixed', $chk);
    //$upl=upload_btn('upl',$url.'&save_img='.$k,'upload').br();
    return $ret . imgform($url . '&save_img=' . $k, $mnu, '');
}
Beispiel #10
0
 }
 $moderators = '';
 $cat = $db['category'];
 $kathname = getcategoryname($cat);
 eval("\$forum_head = \"" . gettemplate("forum_head") . "\";");
 echo $forum_head;
 $bg1 = BG_1;
 $message = '';
 if ($loggedin) {
     if (isset($_POST['preview'])) {
         $bg1 = BG_1;
         $bg2 = BG_2;
         $time = date("H:i", time());
         $date = "today";
         $message = cleartext(stripslashes(str_replace(array('\\r\\n', '\\n'), array("\n", "\n"), $_POST['message'])));
         $message = toggle($message, 'xx');
         $username = '******' . $userID . '"><b>' . getnickname($userID) . '</b></a>';
         $board = (int) $_POST['board'];
         $topicname = stripslashes($_POST['topicname']);
         if (!isset($postID)) {
             $postID = '';
         }
         if (isclanmember($userID)) {
             $member = ' <img src="images/icons/member.gif" alt="' . $_language->module['clanmember'] . '" />';
         } else {
             $member = '';
         }
         if (getavatar($userID)) {
             $avatar = '<img src="images/avatars/' . getavatar($userID) . '" alt="" />';
         } else {
             $avatar = '';
Beispiel #11
0
<?php

echo _open('div.dm_box.big.seo_validation');
echo _tag('h1.title', __('Seo improvements'));
echo _open('div.dm_box_inner');
foreach ($duplicated as $meta => $values) {
    echo _tag('h2', ucfirst(__('Duplicated %1%', array('%1%' => dmString::pluralize($meta)))));
    echo _open('div.dm_table_wrap') . _open('table.dm_table');
    echo _tag('thead', _tag('tr', _tag('th', $meta) . _tag('th', __('Pages'))));
    toggle_init();
    foreach ($values as $value => $pages) {
        echo _open('tr' . toggle('.even'));
        echo _tag('td', $value);
        echo _open('td');
        echo _open('ul');
        foreach ($pages as $page) {
            echo _tag('li', _tag('a.s16.s16_next.dm_toggler', $page->get('name')) . _tag('div.actions.none.dm_toggled', get_partial('pageActions', array('page' => $page, 'meta' => $meta))));
        }
        echo _close('ul');
        echo _close('td');
        echo _close('tr');
    }
    echo _close('table') . _close('div');
}
echo _close('div');
echo _close('div');
Beispiel #12
0
     safe_query("UPDATE " . PREFIX . "articles SET viewed=viewed+1 WHERE articlesID='" . $articlesID . "'");
 }
 $result = safe_query("SELECT * FROM " . PREFIX . "articles WHERE articlesID='" . $articlesID . "'");
 if (mysql_num_rows($result)) {
     $ds = mysql_fetch_array($result);
     $date = date("d.m.Y", $ds['date']);
     $time = date("H:i", $ds['date']);
     $title = clearfromtags($ds['title']);
     $content = array();
     $query = safe_query("SELECT * FROM " . PREFIX . "articles_contents WHERE articlesID = '" . $articlesID . "' ORDER BY page ASC");
     while ($qs = mysql_fetch_array($query)) {
         $content[] = $qs['content'];
     }
     $pages = count($content);
     $content = htmloutput($content[$page - 1]);
     $content = toggle($content, $ds['articlesID']);
     if ($pages > 1) {
         $page_link = makepagelink("index.php?site=articles&amp;action=show&amp;articlesID={$articlesID}", $page, $pages);
     } else {
         $page_link = '';
     }
     $poster = '<a href="index.php?site=profile&amp;id=' . $ds['poster'] . '"><b>' . getnickname($ds['poster']) . '</b></a>';
     $related = "";
     if ($ds['link1'] && $ds['url1'] != "http://" && $ds['window1']) {
         $related .= '&#8226; <a href="' . $ds['url1'] . '" target="_blank">' . $ds['link1'] . '</a> ';
     }
     if ($ds['link1'] && $ds['url1'] != "http://" && !$ds['window1']) {
         $related .= '&#8226; <a href="' . $ds['url1'] . '">' . $ds['link1'] . '</a> ';
     }
     if ($ds['link2'] && $ds['url2'] != "http://" && $ds['window2']) {
         $related .= '&#8226; <a href="' . $ds['url2'] . '" target="_blank">' . $ds['link2'] . '</a> ';
Beispiel #13
0
 $content = $message_array[$showlang]['message'];
 $newsID = $ds['newsID'];
 if ($ds['intern'] == 1) {
     $isintern = '(' . $_language->module['intern'] . ')';
 } else {
     $isintern = '';
 }
 if ($ds['live'] == 1) {
     $islive = '(' . $_language->module['live'] . ')';
 } else {
     $islive = '';
 }
 $content = htmloutput($content);
 $content = toggle($content, $ds['newsID']);
 $intro = htmloutput($intro);
 $intro = toggle($intro, $ds['newsID']);
 $headline = clearfromtags($headline);
 $poster = '<a href="user/' . $ds['poster'] . '/">' . getnickname($ds['poster']) . '</a>';
 $related = "";
 if ($ds['link1'] && $ds['url1'] != "http://" && $ds['window1']) {
     $related .= '&#8226; <a href="' . $ds['url1'] . '" target="_blank">' . $ds['link1'] . '</a> ';
 }
 if ($ds['link1'] && $ds['url1'] != "http://" && !$ds['window1']) {
     $related .= '&#8226; <a href="' . $ds['url1'] . '">' . $ds['link1'] . '</a> ';
 }
 if ($ds['link2'] && $ds['url2'] != "http://" && $ds['window2']) {
     $related .= '&#8226; <a href="' . $ds['url2'] . '" target="_blank">' . $ds['link2'] . '</a> ';
 }
 if ($ds['link2'] && $ds['url2'] != "http://" && !$ds['window2']) {
     $related .= '&#8226; <a href="' . $ds['url2'] . '">' . $ds['link2'] . '</a> ';
 }
     } else {
         $color = "";
     }
     $output_crew_fund .= "<tr><td class=\"" . $row_style_crew_fund . "\">" . $row['item_description'] . "</td>\n" . "<td class=\"" . $row_style_crew_fund . "\">" . $artwork . "</td>\n" . "<td class=\"" . $row_style_crew_fund . "\">" . $color . "</td>\n" . "<td class=\"" . $row_style_crew_fund . "\">" . $row['item_type'] . "</td>\n" . "<td class=\"" . $row_style_crew_fund . "\">" . $row['item_size'] . "</td>\n" . "<td class=\"" . $row_style_crew_fund . "\">" . $row['qty'] . "</td></tr>\n";
     $last_item_name_crew_fund = $row['item_name'];
 }
 while ($row = $result_purchase_card->fetch_assoc()) {
     //This item is paid for with a PURCHASE CARD
     $rows_purchase_card++;
     if (strripos($row['item_name'], 'screen-printed') === false && strripos($row['item_name'], 'screen printed') === false) {
         $artwork = "Embroidered";
     } else {
         $artwork = "Screen-print";
     }
     if ($row['item_name'] != $last_item_name_purchase_card) {
         $row_style_purchase_card = toggle($row_style_purchase_card);
     }
     if (strpos(strtolower($row['item_name']), "orange") !== false) {
         $color = "Orange";
     } elseif (strpos(strtolower($row['item_name']), "black") !== false) {
         $color = "Black";
     } else {
         $color = "";
     }
     $output_purchase_card .= "<tr><td class=\"" . $row_style_purchase_card . "\">" . $row['item_description'] . "</td>\n" . "<td class=\"" . $row_style_purchase_card . "\">" . $artwork . "</td>\n" . "<td class=\"" . $row_style_purchase_card . "\">" . $color . "</td>\n" . "<td class=\"" . $row_style_purchase_card . "\">" . $row['item_type'] . "</td>\n" . "<td class=\"" . $row_style_purchase_card . "\">" . $row['item_size'] . "</td>\n" . "<td class=\"" . $row_style_purchase_card . "\">" . $row['qty'] . "</td></tr>\n";
     $last_item_name_purchase_card = $row['item_name'];
 }
 $output_crew_fund .= "</table>\n";
 $output_purchase_card .= "</table>\n";
 print $output_crew_fund . "<br />\n" . $output_purchase_card . "<br />\n";
 break;
Beispiel #15
0
<?php
extract($_REQUEST);

echo $title_download;

$ergebnis=safe_query("SELECT * FROM ".PREFIX."download");
if(mysql_num_rows($ergebnis)) {
    $ds=mysql_fetch_array($ergebnis);

        $download=htmloutput($ds[download]);
        $download=toggle($download, 1);

        $bg1=BG_1;
        eval ("\$download = \"".gettemplate("download")."\";");
        echo $download;
}
else echo'No Downloads available!';
?>
Beispiel #16
0
function cancel_menu($del)
{
    $r = msql_read('server', 'program_dev', '');
    //1=>array('','','')
    if ($del == 'all') {
        $r = array();
        modif_vars('server', 'program_dev', $r, 'repl');
    }
    if ($del) {
        unset($r[$del]);
        modif_vars('server', 'program_dev', $del, 'del');
    }
    //$ret.=lj('txtx','popup_plup__2_dev_cancel*menu_all','empty').br();
    if ($r) {
        foreach ($r as $k => $v) {
            $i++;
            $jx = ajx($v[0] . '|' . $v[1] . '|' . $v[2], '');
            $ret .= toggle('txtblc', $k . '_plug_dev_cancel*preview_' . $k, $i . '-' . $v[2], 0) . ' ';
            $ret .= lj('txtx', 'edc_plug__2_dev_func*edit*j_' . $jx, 'edit') . ' ';
            $ret .= lj('txtx', 'edc_plug__2_dev_func*edit*jr_' . $k, 'restore') . ' ';
            $ret .= lj('txtx', 'popup_plup__2_dev_cancel*menu_' . $k, 'x') . ' ';
            $ret .= btd($k, '') . br();
        }
    }
    return $ret;
}
Beispiel #17
0
         $hp = '<a href="' . $ds['url'] . '" target="_blank"><img src="images/icons/hp.gif" border="0" width="14" height="14" alt="' . $_language->module['homepage'] . '" /></a>';
     } else {
         $hp = '';
     }
     $ip = 'IP: ';
     if (isfeedbackadmin($userID)) {
         $ip .= $ds['ip'];
     } else {
         $ip .= 'saved';
     }
     $quotemessage = addslashes(getinput($ds['comment']));
     $quotenickname = addslashes(getinput($ds['nickname']));
     $quote = str_replace(array('%nickname%', '%message%'), array($quotenickname, $quotemessage), $_language->module['quote_link']);
 }
 $content = cleartext($ds['comment']);
 $content = toggle($content, $ds['commentID']);
 if (isfeedbackadmin($userID) or iscommentposter($userID, $ds['commentID'])) {
     $edit = '<a href="index.php?site=comments&amp;editcomment=true&amp;id=' . $ds['commentID'] . '&amp;ref=' . urlencode($referer) . '" title="' . $_language->module['edit_comment'] . '"><img src="images/icons/edit.gif" border="0" alt="' . $_language->module['edit_comment'] . '" /></a>';
 } else {
     $edit = '';
 }
 if (isfeedbackadmin($userID)) {
     $actions = '<input class="input" type="checkbox" name="commentID[]" value="' . $ds['commentID'] . '" />';
 } else {
     $actions = '';
 }
 eval("\$comments = \"" . gettemplate("comments") . "\";");
 echo $comments;
 unset($member);
 unset($quote);
 unset($country);
Beispiel #18
0
function showtopic($topic, $edit, $addreply, $quoteID, $type)
{
    global $userID;
    global $loggedin;
    global $page;
    global $maxposts;
    global $preview;
    global $message;
    global $picsize_l;
    global $_language;
    $_language->read_module('forum');
    $_language->read_module('bbcode', true);
    $pagebg = PAGEBG;
    $border = BORDER;
    $bghead = BGHEAD;
    $bgcat = BGCAT;
    $thread = safe_query("SELECT * FROM " . PREFIX . "forum_topics WHERE topicID='{$topic}' ");
    $dt = mysql_fetch_array($thread);
    $usergrp = 0;
    $writer = 0;
    $ismod = ismoderator($userID, $dt['boardID']);
    if ($dt['writegrps'] != "" and !$ismod) {
        $writegrps = explode(";", $dt['writegrps']);
        foreach ($writegrps as $value) {
            if (isinusergrp($value, $userID)) {
                $usergrp = 1;
                $writer = 1;
                break;
            }
        }
    } else {
        $writer = 1;
    }
    if ($dt['readgrps'] != "" and !$usergrp and !$ismod) {
        $readgrps = explode(";", $dt['readgrps']);
        foreach ($readgrps as $value) {
            if (isinusergrp($value, $userID)) {
                $usergrp = 1;
                break;
            }
        }
        if (!$usergrp) {
            echo $_language->module['no_permission'];
            redirect('index.php?site=forum', $_language->module['no_permission'], 2);
            return;
        }
    }
    $gesamt = mysql_num_rows(safe_query("SELECT topicID FROM " . PREFIX . "forum_posts WHERE topicID='{$topic}'"));
    if ($gesamt == 0) {
        die($_language->module['topic_not_found'] . " <a href=\"javascript:history.back()\">back</a>");
    }
    $pages = 1;
    if (!isset($page) || ($site = '')) {
        $page = 1;
    }
    if (isset($type)) {
        if (!($type == 'ASC' || $type == 'DESC')) {
            $type = "ASC";
        }
    } else {
        $type = "ASC";
    }
    $max = $maxposts;
    $pages = ceil($gesamt / $maxposts);
    $page_link = '';
    if ($pages > 1) {
        $page_link = makepagelink("index.php?site=forum_topic&amp;topic={$topic}&amp;type={$type}", $page, $pages);
    }
    if ($type == "ASC") {
        $sorter = '<a href="index.php?site=forum_topic&amp;topic=' . $topic . '&amp;page=' . $page . '&amp;type=DESC">' . $_language->module['sort'] . ':</a> <img src="images/icons/asc.gif" alt="" />';
    } else {
        $sorter = '<a href="index.php?site=forum_topic&amp;topic=' . $topic . '&amp;page=' . $page . '&amp;type=ASC">' . $_language->module['sort'] . ':</a> <img src="images/icons/desc.gif" alt="" />';
    }
    $start = 0;
    if ($page > 1) {
        $start = $page * $max - $max;
    }
    safe_query("UPDATE " . PREFIX . "forum_topics SET views=views+1 WHERE topicID='{$topic}' ");
    // viewed topics
    if (mysql_num_rows(safe_query("SELECT userID FROM " . PREFIX . "user WHERE topics LIKE '%|" . $topic . "|%'"))) {
        $gv = mysql_fetch_array(safe_query("SELECT topics FROM " . PREFIX . "user WHERE userID='{$userID}'"));
        $array = explode("|", $gv['topics']);
        $new = '|';
        foreach ($array as $split) {
            if ($split != "" and $split != $topic) {
                $new = $new . $split . '|';
            }
        }
        safe_query("UPDATE " . PREFIX . "user SET topics='" . $new . "' WHERE userID='{$userID}'");
    }
    // end viewed topics
    $topicname = getinput($dt['topic']);
    $ergebnis = safe_query("SELECT * FROM " . PREFIX . "forum_boards WHERE boardID='" . $dt['boardID'] . "' ");
    $db = mysql_fetch_array($ergebnis);
    $boardname = $db['name'];
    $moderators = getmoderators($dt['boardID']);
    $topicactions = '<a href="printview.php?board=' . $dt['boardID'] . '&amp;topic=' . $topic . '" target="_blank"><img src="images/icons/printview.gif" border="0" alt="printview" /></a> ';
    if ($loggedin and $writer) {
        $topicactions .= '<a href="index.php?site=forum&amp;addtopic=true&amp;action=newtopic&amp;board=' . $dt['boardID'] . '">' . $_language->module['newtopic_image'] . '</a> <a href="index.php?site=forum_topic&amp;topic=' . $topic . '&amp;addreply=true&amp;page=' . $pages . '&amp;type=' . $type . '">' . $_language->module['newreply_image'] . '</a>';
    }
    if ($dt['closed']) {
        $closed = $_language->module['closed_image'];
    } else {
        $closed = '';
    }
    $posttype = 'topic';
    $kathname = getcategoryname($db['category']);
    eval("\$forum_topics_title = \"" . gettemplate("forum_topics_title") . "\";");
    echo $forum_topics_title;
    eval("\$forum_topics_actions = \"" . gettemplate("forum_topics_actions") . "\";");
    echo $forum_topics_actions;
    if ($dt['closed']) {
        echo '<br /><br />' . $_language->module['closed_image'] . '<br /><br />';
    }
    if ($edit && !$dt['closed']) {
        $id = $_GET['id'];
        $dr = mysql_fetch_array(safe_query("SELECT * FROM " . PREFIX . "forum_posts WHERE postID='" . $id . "'"));
        $topic = $_GET['topic'];
        $bg1 = BG_1;
        $_sticky = $dt['sticky'] == '1' ? 'checked="checked"' : '';
        $anz = mysql_num_rows(safe_query("SELECT * FROM " . PREFIX . "forum_posts WHERE topicID='" . $dt['topicID'] . "' AND postID='" . $id . "' AND poster='" . $userID . "' ORDER BY date ASC LIMIT 0,1"));
        if ($anz or isforumadmin($userID) or ismoderator($userID, $dt['boardID'])) {
            if (istopicpost($dt['topicID'], $id)) {
                $bg1 = BG_1;
                // topicmessage
                $message = getinput($dr['message']);
                $post = $id;
                $board = $dt['boardID'];
                // notification check
                $notifyqry = safe_query("SELECT * FROM " . PREFIX . "forum_notify WHERE topicID='" . $topic . "' AND userID='" . $userID . "'");
                if (mysql_num_rows($notifyqry)) {
                    $notify = '<input class="input" type="checkbox" name="notify" value="1" checked="checked" /> ' . $_language->module['notify_reply'] . '<br />';
                } else {
                    $notify = '<input class="input" type="checkbox" name="notify" value="1" /> ' . $_language->module['notify_reply'] . '<br />';
                }
                //STICKY
                if (isforumadmin($userID) || ismoderator($userID, $board)) {
                    $chk_sticky = '<br />' . "\n" . ' <input class="input" type="checkbox" name="sticky" value="1" ' . $_sticky . ' /> ' . $_language->module['make_sticky'];
                } else {
                    $chk_sticky = '';
                }
                // topic icon list
                $iconlist = '<tr bgcolor="' . $bg1 . '">
          <td><input type="radio" class="input" name="icon" value="ausrufezeichen.gif" />
          <img src="images/icons/topicicons/ausrufezeichen.gif" width="15" height="15" alt="" /></td>
          <td><input type="radio" class="input" name="icon" value="biggrin.gif" />
          <img src="images/icons/topicicons/biggrin.gif" width="15" height="15" alt="" /></td>
          <td><input type="radio" class="input" name="icon" value="boese.gif" />
          <img src="images/icons/topicicons/boese.gif" width="15" height="15" alt="" /></td>
          <td><input type="radio" class="input" name="icon" value="bored.gif" />
          <img src="images/icons/topicicons/bored.gif" width="15" height="15" alt="" /></td>
          <td><input type="radio" class="input" name="icon" value="cool.gif" />
          <img src="images/icons/topicicons/cool.gif" width="15" height="15" alt="" /></td>
          <td><input type="radio" class="input" name="icon" value="eek.gif" />
          <img src="images/icons/topicicons/eek.gif" width="15" height="15" alt="" /></td>
          <td><input type="radio" class="input" name="icon" value="frage.gif" />
          <img src="images/icons/topicicons/frage.gif" width="15" height="15" alt="" /></td>
          <td><input type="radio" class="input" name="icon" value="frown.gif" />
          <img src="images/icons/topicicons/frown.gif" width="15" height="15" alt="" /></td>
        </tr>
        <tr bgcolor="' . $bg1 . '">
          <td><input type="radio" class="input" name="icon" value="lampe.gif" />
          <img src="images/icons/topicicons/lampe.gif" width="15" height="15" alt="" /></td>
          <td><input type="radio" class="input" name="icon" value="mad.gif" />
          <img src="images/icons/topicicons/mad.gif" width="15" height="15" alt="" /></td>
          <td><input type="radio" class="input" name="icon" value="pfeil.gif" />
          <img src="images/icons/topicicons/pfeil.gif" width="15" height="15" alt="" /></td>
          <td><input type="radio" class="input" name="icon" value="smile.gif" />
          <img src="images/icons/topicicons/smile.gif" width="15" height="15" alt="" /></td>
          <td><input type="radio" class="input" name="icon" value="text.gif" />
          <img src="images/icons/topicicons/text.gif" width="15" height="15" alt="" /></td>
          <td><input type="radio" class="input" name="icon" value="thumb_down.gif" />
          <img src="images/icons/topicicons/thumb_down.gif" width="15" height="15" alt="" /></td>
          <td><input type="radio" class="input" name="icon" value="thumb_up.gif" />
          <img src="images/icons/topicicons/thumb_up.gif" width="15" height="15" alt="" /></td>
          <td><input type="radio" class="input" name="icon" value="wink.gif" />
          <img src="images/icons/topicicons/wink.gif" width="15" height="15" alt="" /></td>
        </tr>
        <tr bgcolor="' . $bg1 . '">
            <td colspan="4"><input type="radio" class="input" name="icon" value="0" /> ' . $_language->module['no_icon'] . '</td>
          </tr>';
                if ($dt['icon']) {
                    $iconlist = str_replace('value="' . $dt['icon'] . '"', 'value="' . $dt['icon'] . '" checked="checked"', $iconlist);
                } else {
                    $iconlist = str_replace('value="0"', 'value="0" checked="checked"', $iconlist);
                }
                eval("\$addbbcode = \"" . gettemplate("addbbcode") . "\";");
                eval("\$forum_edittopic = \"" . gettemplate("forum_edittopic") . "\";");
                echo $forum_edittopic;
            } else {
                // notification check
                $notifyqry = safe_query("SELECT * FROM " . PREFIX . "forum_notify WHERE topicID='" . $topic . "' AND userID='" . $userID . "'");
                if (mysql_num_rows($notifyqry)) {
                    $notify = '<input class="input" type="checkbox" name="notify" value="1" checked="checked" /> ' . $_language->module['notify_reply'];
                } else {
                    $notify = '<input class="input" type="checkbox" name="notify" value="1" /> ' . $_language->module['notify_reply'];
                }
                //STICKY
                if (isforumadmin($userID) || ismoderator($userID, $board)) {
                    $chk_sticky = '<br />' . "\n" . ' <input class="input" type="checkbox" name="sticky" value="1" ' . $_sticky . ' /> ' . $_language->module['make_sticky'];
                } else {
                    $chk_sticky = '';
                }
                $dr['message'] = getinput($dr['message']);
                eval("\$addbbcode = \"" . gettemplate("addbbcode") . "\";");
                eval("\$forum_editpost = \"" . gettemplate("forum_editpost") . "\";");
                echo $forum_editpost;
            }
        } else {
            echo $_language->module['permission_denied'] . '<br /><br />';
        }
        $replys = safe_query("SELECT * FROM " . PREFIX . "forum_posts WHERE topicID='{$topic}' ORDER BY date DESC LIMIT {$start}, {$max}");
    } elseif ($addreply && !$dt['closed']) {
        if ($loggedin and $writer) {
            if (isset($_POST['preview'])) {
                $bg1 = BG_1;
                $bg2 = BG_2;
                $time = date("H:i", time());
                $date = $_language->module['today'];
                $message_preview = getforminput($_POST['message']);
                $postID = 0;
                $message = cleartext(getforminput($_POST['message']));
                $message = toggle($message, 'xx');
                $username = '******' . $userID . '"><b>' . getnickname($userID) . '</b></a>';
                if (isclanmember($userID)) {
                    $member = ' <img src="images/icons/member.gif" alt="' . $_language->module['clanmember'] . '" />';
                } else {
                    $member = '';
                }
                if ($getavatar = getavatar($userID)) {
                    $avatar = '<img src="images/avatars/' . $getavatar . '" alt="" />';
                } else {
                    $avatar = '';
                }
                if ($getsignatur = getsignatur($userID)) {
                    $signatur = cleartext($getsignatur);
                } else {
                    $signatur = '';
                }
                if ($getemail = getemail($userID) and !getemailhide($userID)) {
                    $email = '<a href="mailto:' . mail_protect($getemail) . '"><img src="images/icons/email.gif" border="0" alt="email" /></a>';
                } else {
                    $email = '';
                }
                if (isset($_POST['notify'])) {
                    $notify = 'checked="checked"';
                } else {
                    $notify = '';
                }
                $pm = '';
                $buddy = '';
                $statuspic = '<img src="images/icons/online.gif" alt="online" />';
                if (!validate_url(gethomepage($userID))) {
                    $hp = '';
                } else {
                    $hp = '<a href="' . gethomepage($userID) . '" target="_blank"><img src="images/icons/hp.gif" border="0" alt="' . $_language->module['homepage'] . '" /></a>';
                }
                $registered = getregistered($userID);
                $posts = getuserforumposts($userID);
                if (isset($_POST['sticky'])) {
                    $post_sticky = $_POST['sticky'];
                } else {
                    $post_sticky = null;
                }
                $_sticky = $dt['sticky'] == '1' || $post_sticky == '1' ? 'checked="checked"' : '';
                if (isforumadmin($userID)) {
                    $usertype = $_language->module['admin'];
                    $rang = '<img src="images/icons/ranks/admin.gif" alt="" />';
                } elseif (isanymoderator($userID)) {
                    $usertype = $_language->module['moderator'];
                    $rang = '<img src="images/icons/ranks/moderator.gif" alt="" />';
                } else {
                    $ergebnis = safe_query("SELECT * FROM " . PREFIX . "forum_ranks WHERE {$posts} >= postmin AND {$posts} <= postmax AND postmax >0");
                    $ds = mysql_fetch_array($ergebnis);
                    $usertype = $ds['rank'];
                    $rang = '<img src="images/icons/ranks/' . $ds['pic'] . '" alt="" />';
                }
                if (isforumadmin($userID)) {
                    $chk_sticky = '<br />' . "\n" . ' <input class="input" type="checkbox" name="sticky" value="1" ' . $_sticky . ' /> ' . $_language->module['make_sticky'];
                } elseif (isanymoderator($userID)) {
                    $chk_sticky = '<br />' . "\n" . ' <input class="input" type="checkbox" name="sticky" value="1" ' . $_sticky . ' /> ' . $_language->module['make_sticky'];
                } else {
                    $chk_sticky = '';
                }
                $quote = "";
                $actions = "";
                echo '<table width="100%" cellspacing="1" cellpadding="2" bgcolor="' . BORDER . '">
          <tr bgcolor="' . BGHEAD . '">
            <td colspan="2" class="title" align="center">' . $_language->module['preview'] . '</td>
          </tr>
          <tr bgcolor="' . PAGEBG . '"><td colspan="2"></td></tr>';
                eval("\$forum_topic_content = \"" . gettemplate("forum_topic_content") . "\";");
                echo $forum_topic_content;
                echo '</table>';
                $message = $message_preview;
            } else {
                if ($quoteID) {
                    $ergebnis = safe_query("SELECT poster,message FROM " . PREFIX . "forum_posts WHERE postID='{$quoteID}'");
                    $ds = mysql_fetch_array($ergebnis);
                    $message = '[quote=' . getnickname($ds['poster']) . ']' . getinput($ds['message']) . '[/quote]';
                }
            }
            if (isset($_POST['sticky'])) {
                $post_sticky = $_POST['sticky'];
            } else {
                $post_sticky = null;
            }
            $_sticky = $dt['sticky'] == '1' || $post_sticky == '1' ? 'checked="checked"' : '';
            if (isforumadmin($userID) || ismoderator($userID, $dt['boardID'])) {
                $chk_sticky = '<br />' . "\n" . ' <input class="input" type="checkbox" name="sticky" value="1" ' . $_sticky . ' /> ' . $_language->module['make_sticky'];
            } else {
                $chk_sticky = '';
            }
            if (isset($_POST['notify'])) {
                $post_notify = $_POST['notify'];
            } else {
                $post_notify = null;
            }
            $mysql_notify = mysql_num_rows(safe_query("SELECT notifyID FROM " . PREFIX . "forum_notify WHERE userID='" . $userID . "' AND topicID='" . $topic . "'"));
            $notify = $mysql_notify || $post_notify == '1' ? 'checked="checked"' : '';
            $bg1 = BG_1;
            $board = $dt['boardID'];
            eval("\$addbbcode = \"" . gettemplate("addbbcode") . "\";");
            eval("\$forum_newreply = \"" . gettemplate("forum_newreply") . "\";");
            echo $forum_newreply;
        } elseif ($loggedin) {
            echo '<br /><br />' . $_language->module['no_access_write'] . '<br /><br />';
        } else {
            echo $_language->module['not_logged_msg'];
        }
        $replys = safe_query("SELECT * FROM " . PREFIX . "forum_posts WHERE topicID='{$topic}' ORDER BY date DESC LIMIT 0, " . $max . "");
    } else {
        $replys = safe_query("SELECT * FROM " . PREFIX . "forum_posts WHERE topicID='{$topic}' ORDER BY date {$type} LIMIT " . $start . ", " . $max . "");
    }
    eval("\$forum_topic_head = \"" . gettemplate("forum_topic_head") . "\";");
    echo $forum_topic_head;
    $i = 1;
    while ($dr = mysql_fetch_array($replys)) {
        if ($i % 2) {
            $bg1 = BG_1;
            $bg2 = BG_2;
        } else {
            $bg1 = BG_3;
            $bg2 = BG_4;
        }
        $date = date("d.m.Y", $dr['date']);
        $time = date("H:i", $dr['date']);
        $today = date("d.m.Y", time());
        $yesterday = date("d.m.Y", time() - 3600 * 24);
        if ($date == $today) {
            $date = $_language->module['today'];
        } elseif ($date == $yesterday && $date < $today) {
            $date = $_language->module['yesterday'];
        } else {
            $date = $date;
        }
        $message = cleartext($dr['message']);
        $message = toggle($message, $dr['postID']);
        $postID = $dr['postID'];
        $username = '******' . $dr['poster'] . '"><b>' . stripslashes(getnickname($dr['poster'])) . '</b></a>';
        if (isclanmember($dr['poster'])) {
            $member = ' <img src="images/icons/member.gif" alt="' . $_language->module['clanmember'] . '" />';
        } else {
            $member = '';
        }
        if ($getavatar = getavatar($dr['poster'])) {
            $avatar = '<img src="images/avatars/' . $getavatar . '" alt="" />';
        } else {
            $avatar = '';
        }
        if ($getsignatur = getsignatur($dr['poster'])) {
            $signatur = cleartext($getsignatur);
        } else {
            $signatur = '';
        }
        if ($getemail = getemail($dr['poster']) and !getemailhide($dr['poster'])) {
            $email = '<a href="mailto:' . mail_protect($getemail) . '"><img src="images/icons/email.gif" border="0" alt="email" /></a>';
        } else {
            $email = '';
        }
        $pm = '';
        $buddy = '';
        if ($loggedin && $dr['poster'] != $userID) {
            $pm = '<a href="index.php?site=messenger&amp;action=touser&amp;touser='******'poster'] . '"><img src="images/icons/pm.gif" border="0" width="12" height="13" alt="' . $_language->module['messenger'] . '" /></a>';
            if (isignored($userID, $dr['poster'])) {
                $buddy = '<a href="buddys.php?action=readd&amp;id=' . $dr['poster'] . '&amp;userID=' . $userID . '"><img src="images/icons/buddy_readd.gif" border="0" alt="' . $_language->module['back_buddy'] . '" /></a>';
            } elseif (isbuddy($userID, $dr['poster'])) {
                $buddy = '<a href="buddys.php?action=ignore&amp;id=' . $dr['poster'] . '&amp;userID=' . $userID . '"><img src="images/icons/buddy_ignore.gif" border="0" alt="' . $_language->module['ignore'] . '" /></a>';
            } else {
                $buddy = '<a href="buddys.php?action=add&amp;id=' . $dr['poster'] . '&amp;userID=' . $userID . '"><img src="images/icons/buddy_add.gif" border="0" alt="' . $_language->module['add_buddy'] . '" /></a>';
            }
        }
        if (isonline($dr['poster']) == "offline") {
            $statuspic = '<img src="images/icons/offline.gif" alt="offline" />';
        } else {
            $statuspic = '<img src="images/icons/online.gif" alt="online" />';
        }
        if (!validate_url(gethomepage($dr['poster']))) {
            $hp = '';
        } else {
            $hp = '<a href="' . gethomepage($dr['poster']) . '" target="_blank"><img src="images/icons/hp.gif" border="0" alt="' . $_language->module['homepage'] . '" /></a>';
        }
        if (!$dt['closed']) {
            $quote = '<a href="index.php?site=forum_topic&amp;addreply=true&amp;board=' . $dt['boardID'] . '&amp;topic=' . $topic . '&amp;quoteID=' . $dr['postID'] . '&amp;page=' . $page . '&amp;type=' . $type . '"><img src="images/icons/quote.gif" border="0" alt="' . $_language->module['quote'] . '" /></a>';
        } else {
            $quote = "";
        }
        $registered = getregistered($dr['poster']);
        $posts = getuserforumposts($dr['poster']);
        if (isforumadmin($dr['poster'])) {
            $usertype = $_language->module['admin'];
            $rang = '<img src="images/icons/ranks/admin.gif" alt="" />';
        } elseif (isanymoderator($dr['poster'])) {
            $usertype = $_language->module['moderator'];
            $rang = '<img src="images/icons/ranks/moderator.gif" alt="" />';
        } else {
            $ergebnis = safe_query("SELECT * FROM " . PREFIX . "forum_ranks WHERE {$posts} >= postmin AND {$posts} <= postmax AND postmax >0");
            $ds = mysql_fetch_array($ergebnis);
            $usertype = $ds['rank'];
            $rang = '<img src="images/icons/ranks/' . $ds['pic'] . '" alt="" />';
        }
        $actions = '';
        if (($userID == $dr['poster'] or isforumadmin($userID) or ismoderator($userID, $dt['boardID'])) && !$dt['closed']) {
            $actions = ' <a href="index.php?site=forum_topic&amp;topic=' . $topic . '&amp;edit=true&amp;id=' . $dr['postID'] . '&amp;page=' . $page . '"><img src="images/icons/edit.gif" border="0" alt="' . $_language->module['edit'] . '" /></a> ';
        }
        if (isforumadmin($userID) or ismoderator($userID, $dt['boardID'])) {
            $actions .= '<input class="input" type="checkbox" name="postID[]" value="' . $dr['postID'] . '" />';
        }
        eval("\$forum_topic_content = \"" . gettemplate("forum_topic_content") . "\";");
        echo $forum_topic_content;
        unset($actions);
        $i++;
    }
    $adminactions = "";
    if (isforumadmin($userID) or ismoderator($userID, $dt['boardID'])) {
        if ($dt['closed']) {
            $close = '<option value="opentopic">- ' . $_language->module['reopen_topic'] . '</option>';
        } else {
            $close = '<option value="closetopic">- ' . $_language->module['close_topic'] . '</option>';
        }
        $adminactions = '<input class="input" type="checkbox" name="ALL" value="ALL" onclick="SelectAll(this.form);" /> ' . $_language->module['select_all'] . '
		<select name="admaction">
      <option value="0">' . $_language->module['admin_actions'] . ':</option>
      <option value="delposts">- ' . $_language->module['delete_posts'] . '</option>
      <option value="stickytopic">- ' . $_language->module['make_topic_sticky'] . '</option>
      <option value="unstickytopic">- ' . $_language->module['make_topic_unsticky'] . '</option>
      <option value="movetopic">- ' . $_language->module['move_topic'] . '</option>
      ' . $close . '
      <option value="deletetopic">- ' . $_language->module['delete_topic'] . '</option>
    </select>
    <input type="hidden" name="topicID" value="' . $topic . '" />
    <input type="hidden" name="board" value="' . $dt['boardID'] . '" />
    <input type="submit" name="submit" value="' . $_language->module['go'] . '" />';
    }
    eval("\$forum_topic_foot = \"" . gettemplate("forum_topic_foot") . "\";");
    echo $forum_topic_foot;
    eval("\$forum_topics_actions = \"" . gettemplate("forum_topics_actions") . "\";");
    echo $forum_topics_actions;
    echo '<div align="right">' . $adminactions . '</div></form>';
    if ($dt['closed']) {
        echo $_language->module['closed_image'];
    } else {
        if (!$loggedin && !$edit) {
            echo $_language->module['not_logged_msg'];
        }
    }
}
Beispiel #19
0
##########################################################################
*/
if (isset($_GET['staticID'])) {
    $staticID = $_GET['staticID'];
} else {
    $staticID = '';
}
$ds = mysql_fetch_array(safe_query("SELECT * FROM " . PREFIX . "static WHERE staticID='" . $staticID . "'"));
$_language->read_module("static");
$allowed = false;
switch ($ds['accesslevel']) {
    case 0:
        $allowed = true;
        break;
    case 1:
        if ($userID) {
            $allowed = true;
        }
        break;
    case 2:
        if (isclanmember($userID)) {
            $allowed = true;
        }
        break;
}
if ($allowed) {
    $content = $ds['content'];
    echo toggle(htmloutput($content), 1);
} else {
    redirect("index.php", $_language->module['no_access'], 3);
}
Beispiel #20
0
<?php

defined('KOOWA') or die('Restricted access');
?>

<?php 
foreach ($ranks as $i => $rank) {
    ?>
<tr class="<?php 
    echo @ninja('grid.zebra');
    ?>
 state-<?php 
    echo @toggle($rank->enabled, 'enable', 'disable');
    ?>
">
	<?php 
    echo @ninja('grid.count', array('total' => @$total));
    ?>
	<td class="grid-check"><?php 
    echo @ninja('grid.checkedout', array('row' => $rank));
    ?>
</td>
	<td><?php 
    echo @$edit($rank, $i, 'title', 'id');
    ?>
</td>
	<td width="160px"><img src="<?php 
    echo @img('/rank/' . $rank->rank_file);
    ?>
" alt="<?php 
    echo $rank->title;
Beispiel #21
0
/**
 * Main function
 */
function main()
{
    $mapPart1 = initPart1();
    $mapPart2 = initPart2();
    $instructionList = getFile();
    $brightness = 0;
    foreach ($instructionList as $instruction) {
        $todo = readInstruction($instruction);
        if ($todo['action'] === 'toggle') {
            toggle($mapPart1, $mapPart2, $todo['startX'], $todo['startY'], $todo['endX'], $todo['endY']);
        } else {
            if ($todo['action'] === 'on' || $todo['action'] === 'off') {
                switchOnOff($mapPart1, $mapPart2, $todo['action'], $todo['startX'], $todo['startY'], $todo['endX'], $todo['endY']);
            }
        }
    }
    print 'Part1: ' . checkPart1($mapPart1) . PHP_EOL;
    print 'Part2: ' . checkPart2($mapPart2) . PHP_EOL;
}
Beispiel #22
0
 $adminactions = '';
 if (isfileadmin($userID)) {
     $adminactions = '<table width="100%" border="0" cellpadding="0" cellspacing="0"><tr><td align="left">';
     $adminactions .= '</td><td align="right"><input type="button" onclick="MM_goToURL(\'parent\',\'index.php?site=files&amp;action=newfile\');return document.MM_returnValue" value="' . $_language->module['new_file'] . '" /> ';
     $adminactions .= '<input type="button" onclick="MM_openBrWindow(\'admin/admincenter.php?site=filecategorys\',\'\')" value="' . $_language->module['new_category'] . '" />';
     $adminactions .= '</td></tr></table><br />';
 }
 // FILE-INFORMATION
 $file = mysql_fetch_array(safe_query("SELECT * FROM " . PREFIX . "files WHERE fileID='" . $_GET['file'] . "'"));
 if ($file['accesslevel'] == 2 and !isclanmember($userID)) {
     die($_language->module['no_access']);
 }
 $fileID = $file['fileID'];
 $filename = clearfromtags($file['filename']);
 $fileinfo = cleartext($file['info']);
 $fileinfo = toggle($fileinfo, $file['fileID']);
 $filesize = $file['filesize'];
 if (!$filesize) {
     $filesize = 0;
 }
 $downloads = $file['downloads'];
 if (!$downloads) {
     $downloads = 0;
 }
 $filevotes = $file['votes'];
 $filevotes ? $filevotes = ', ' . $filevotes . ' votes' : ($filevotes = ', unrated');
 $traffic = detectfilesize($filesize * $downloads);
 $filesize = detectfilesize($file['filesize']);
 $reportlink = '<a href="index.php?site=files&amp;action=report&amp;link=' . $file['fileID'] . '"><b>' . $_language->module['report_dead_link'] . '</b></a>';
 $date = date("d.m.Y", $file['date']);
 // FILE-AUTHOR
Beispiel #23
0
        if (validate_url($ds['hp'])) {
            $hp = '<a href="' . $ds['hp'] . '" target="_blank"><img src="images/icons/hp.gif" border="0" width="14" height="14" alt="homepage" /></a>';
        } else {
            $hp = '';
        }
        $sem = '/[0-9]{6,11}/si';
        $icq_number = str_replace('-', '', $ds['icq']);
        if (preg_match($sem, $ds['icq'])) {
            $icq = '<a href="http://www.icq.com/people/about_me.php?uin=' . $icq_number . '" target="_blank"><img src="http://online.mirabilis.com/scripts/online.dll?icq=' . $ds['icq'] . '&amp;img=5" border="0" alt="icq" /></a>';
        } else {
            $icq = "";
        }
        $guestbookID = 'id_' . $ds['gbID'];
        $name = strip_tags($ds['name']);
        $message = cleartext($ds['comment']);
        $message = toggle($message, $ds['gbID']);
        unset($admincomment);
        if ($ds['admincomment'] != "") {
            $admincomment = '<hr />
			<small><b>' . $_language->module['admin_comment'] . ':</b><br />' . cleartext($ds['admincomment']) . '</small>';
        } else {
            $admincomment = '';
        }
        $actions = '';
        $ip = 'logged';
        $quote = '<a href="index.php?site=guestbook&amp;action=add&amp;messageID=' . $ds['gbID'] . '"><img src="images/icons/quote.gif" border="0" alt="quote" /></a>';
        if (isfeedbackadmin($userID)) {
            $actions = ' <a href="index.php?site=guestbook&amp;action=comment&amp;guestbookID=' . $ds['gbID'] . '"><img src="images/icons/admincomment.gif" border="0" alt="Admincomment" /></a> <input class="input" type="checkbox" name="gbID[]" value="' . $ds['gbID'] . '" />';
            $ip = $ds['ip'];
        }
        eval("\$guestbook = \"" . gettemplate("guestbook") . "\";");
Beispiel #24
0
#                                   /                                    #
#                                                                        #
#                                                                        #
#   Copyright 2005-2011 by webspell.org                                  #
#                                                                        #
#   visit webSPELL.org, webspell.info to get webSPELL for free           #
#   - Script runs under the GNU GENERAL PUBLIC LICENSE                   #
#   - It's NOT allowed to remove this copyright-tag                      #
#   -- http://www.fsf.org/licensing/licenses/gpl.html                    #
#                                                                        #
#   Code based on WebSPELL Clanpackage (Michael Gruber - webspell.at),   #
#   Far Development by Development Team - webspell.org                   #
#                                                                        #
#   visit webspell.org                                                   #
#                                                                        #
##########################################################################
*/
$_language->read_module('about');
eval("\$title_about = \"" . gettemplate("title_about") . "\";");
echo $title_about;
$ergebnis = safe_query("SELECT * FROM " . PREFIX . "about");
if (mysql_num_rows($ergebnis)) {
    $ds = mysql_fetch_array($ergebnis);
    $about = htmloutput($ds['about']);
    $about = toggle($about, 1);
    $bg1 = BG_1;
    eval("\$about = \"" . gettemplate("about") . "\";");
    echo $about;
} else {
    echo $_language->module['no_about'];
}
Beispiel #25
0
function rssj($p, $o)
{
    $r = msql_read('', ses('qb') . '_' . $p, '', 1);
    //$r=msq_sort($r,1,'');
    if ($r) {
        foreach ($r as $k => $v) {
            if ($v[2] == $o or !$o) {
                if (substr($v[0], 0, 4) == 'http') {
                    $v[0] = substr($v[0], 7);
                }
                if ($v[0]) {
                    $ret[$v[2]] .= toggle('', 'rsj' . $k . '_rssj_' . $k . '_' . ajx($v[0], ''), $v[1] ? $v[1] : preplink($v[0])) . ' ' . btd('rsj' . $k, '') . br();
                }
            }
        }
    }
    //$v[2]
    //foreach($ret as $k=>$v){ksort($v); $ret[$k]=implode('',$v);}
    if (auth(6)) {
        $b = msqlink('', ses('qb') . '_' . $p) . ' ';
    }
    return make_tabs($ret, 'rss', 'nbp') . $b;
}
Beispiel #26
0
function lj_tog($n, $d, $v)
{
    return toggle('', $n . $d . '_' . $n . '_' . $d, $v) . btd($n . $d, '');
}
Beispiel #27
0
 $i = 0;
 foreach ($message_array as $val) {
     if ($showlang != $i) {
         $langs .= '<span style="padding-left:2px"><a href="index.php?site=news_comments&amp;newsID=' . $ds['newsID'] . '&amp;lang=' . $val['lang'] . '"><img src="images/flags/' . $val['countryShort'] . '.gif" width="18" height="12" border="0" alt="' . $val['country'] . '" /></a></span>';
     }
     $i++;
 }
 $headline = $message_array[$showlang]['headline'];
 $content = $message_array[$showlang]['message'];
 if ($ds['intern'] == 1) {
     $isintern = '(' . $_language->module['intern'] . ')';
 } else {
     $isintern = '';
 }
 $content = htmloutput($content);
 $content = toggle($content, $ds['newsID']);
 $headline = clearfromtags($headline);
 $comments = '';
 $poster = '<a href="index.php?site=profile&amp;id=' . $ds['poster'] . '"><b>' . getnickname($ds['poster']) . '</b></a>';
 $related = '';
 if ($ds['link1'] && $ds['url1'] != "http://" && $ds['window1']) {
     $related .= '&#8226; <a href="' . $ds['url1'] . '" target="_blank">' . $ds['link1'] . '</a> ';
 }
 if ($ds['link1'] && $ds['url1'] != "http://" && !$ds['window1']) {
     $related .= '&#8226; <a href="' . $ds['url1'] . '">' . $ds['link1'] . '</a> ';
 }
 if ($ds['link2'] && $ds['url2'] != "http://" && $ds['window2']) {
     $related .= '&#8226; <a href="' . $ds['url2'] . '" target="_blank">' . $ds['link2'] . '</a> ';
 }
 if ($ds['link2'] && $ds['url2'] != "http://" && !$ds['window2']) {
     $related .= '&#8226; <a href="' . $ds['url2'] . '">' . $ds['link2'] . '</a> ';
Beispiel #28
0
function finder_recursive($r, $p, $rb)
{
    $o = mkprm($rb, 'alone', 5);
    foreach ($r as $k => $v) {
        $id = normalize($p . $k);
        $lk = toggle('', $id . '_finder_' . ajx($p . '/' . $k) . '_' . $o, $k);
        if (is_array($v)) {
            $rte = finder_recursive($v, $p . '/' . $k, $rb);
        } else {
            $rte = '';
        }
        $div = div(atc('fisub') . atd($id), $rte);
        $ret .= divc('fipop', $img . ' &#9658; ' . $lk . ' ' . $size . $div);
    }
    return $ret;
}
<?php

use_helper('Javascript', 'My');
?>
<div class="sidebox">
    <div class="bottom">
        <div class="content" id="tag_cloud_box">
            <?php 
echo toggle('tags-hide', 'tag_cloud-up', 'tag_cloud-down', $sf_user->getPreference('box_tag_cloud') == 'none' ? 'down' : 'up', remote_function(array('url' => "@set_preference?pname=box_tag_cloud", 'with' => "&quot;pvalue=&quot; + \$('tag_cloud-up').style.display")));
?>
            <?php 
echo image_tag('tags.gif');
?>
            <div id="tags-hide"<?php 
echo $sf_user->getPreference('box_tag_cloud') == 'none' ? " style=display:none;" : "";
?>
>
                <ul class="tag_cloud few_tags">
                    <?php 
foreach ($tags as $tag) {
    ?>
                    <li class="rank_<?php 
    echo $tag['rank'];
    ?>
"><?php 
    echo link_to($tag['tag'], 'tag/show?tag=' . $tag['tag'], array('title' => __(":count snippet(s) with tag ':tag'", array(':count' => $tag['count'], ':tag' => $tag['tag']))));
    ?>
</li>
                    <?php 
}
?>
Beispiel #30
0
<?php

defined('KOOWA') or die('Restricted access');
?>

<?php 
foreach (@$profile_fields as $i => $profile_field) {
    ?>
<tr class="<?php 
    echo @ninja('grid.zebra');
    ?>
 sortable state-<?php 
    echo @toggle($profile_field->enabled, 'enable', 'disable');
    ?>
">
	<td class="handle"></td>
	<?php 
    echo @ninja('grid.count', array('total' => @$total));
    ?>
	<td class="grid-check"><?php 
    echo @ninja('grid.checkedout', array('row' => $profile_field));
    ?>
</td>
	<td><?php 
    echo @$edit($profile_field, $i, 'name', 'id');
    ?>
</td>
	<td align="center" width="32px"><?php 
    echo @ninja('grid.toggle', array('enabled' => $profile_field->enabled));
    ?>
</td>