• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

PHP get_side函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中get_side函数的典型用法代码示例。如果您正苦于以下问题:PHP get_side函数的具体用法?PHP get_side怎么用?PHP get_side使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



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

示例1: db_query

     $nextsite = 2;
 }
 // BEGIN LIST CLAN RANKINGS
 $query = db_query("SELECT * FROM xcl_players left join xcl_players_rank using (pid) WHERE lid='{$ladderc}' AND points!='0' ORDER BY points desc, pid LIMIT {$start},{$prosite}");
 while ($data = mysql_fetch_array($query)) {
     if (get_side($data[countries]) == 1) {
         if ($data[points] > 699) {
             $button = "<img src=\"images/yuri/yuri-red3.jpg\" alt=\"\" >";
         }
         if ($data[points] < 700 && $data[points] > 299) {
             $button = "<img src=\"images/yuri/yuri-red2.jpg\" alt=\"\" >";
         }
         if ($data[points] < 300 && $data[points] > 0) {
             $button = "<img src=\"images/yuri/yuri-red1.jpg\" alt=\"\" >";
         }
     } elseif (get_side($data[countries]) == 2) {
         if ($data[points] > 700) {
             $button = "<img src=\"images/yuri/yuri-p3.jpg\" alt=\"\" >";
         }
         if ($data[points] < 700 && $data[points] > 299) {
             $button = "<img src=\"images/yuri/yuri-p2.jpg\" alt=\"\" >";
         }
         if ($data[points] < 300 && $data[points] > 0) {
             $button = "<img src=\"images/yuri/yuri-p1.jpg\" alt=\"\" >";
         }
     } else {
         if ($data[points] > 700) {
             $button = "<img src=\"images/yuri/yuri-blue3.gif\" alt=\"\" >";
         }
         if ($data[points] < 700 && $data[points] > 299) {
             $button = "<img src=\"images/yuri/yuri-blue2.gif\" alt=\"\" >";
开发者ID:amjadtbssm,项目名称:xcc,代码行数:31,代码来源:yuri.php


示例2: cal_url

?>
"><img src="<?php 
echo cal_url();
?>
/img/share/zurpy.png" alt="zurpy" title="zurpy" /></a>
				</div>
			</div>
						
			<div id="loc_events">
			<h2>&nbsp;<?php 
location_rss_link($myLoc['LocID']);
?>
</h2>
			<?php 
location_events(10);
?>
			
			</div>
			
			<?php 
get_comments($myLoc['CommentsID'], $myLoc['CommentsURL'], $myLoc['Name'], 1);
?>
		</article>
	</section>

	<?php 
get_side();
?>
	
	<?php 
get_footer();
开发者ID:pvidali,项目名称:BCSR-1,代码行数:31,代码来源:location.php


示例3: forum_index

function forum_index(&$sqlr, &$sqlm)
{
    global $enablesidecheck, $forum_skeleton, $forum_lang, $user_lvl, $output, $realm_db, $mmfpm_db;
    if ($enablesidecheck) {
        $side = get_side();
    }
    $sqlm = new SQL();
    $sqlm->connect($mmfpm_db['addr'], $mmfpm_db['user'], $mmfpm_db['pass'], $mmfpm_db['name']);
    $result = $sqlm->query('
		SELECT authorname, id, name, time, forum
		FROM mm_forum_posts
		WHERE id IN 
			(SELECT MAX(id)
			FROM mm_forum_posts
			GROUP BY forum)
		ORDER BY forum;');
    $lasts = array();
    if ($sqlm->num_rows($result) > 0) {
        while ($row = $sqlm->fetch_assoc($result)) {
            $lasts[$row['forum']] = $row;
        }
    }
    $output .= '
<div class="top">
	<h1>' . $forum_lang['forums'] . '</h1>
</div>
<center>
<fieldset>
	<legend><a href="forum.php">' . $forum_lang['forum_index'] . '</a></legend>
	<table class="lined">';
    $cid = $sqlm->query('
		SELECT category, name, description, side_access, level_post_topic, level_read, level_post
		FROM mm_forum_categories');
    while ($category = $sqlm->fetch_assoc($cid)) {
        if ($category['level_read'] > $user_lvl) {
            continue;
        }
        if ($user_lvl == 0 && $enablesidecheck) {
            if ($category['side_access'] != 'ALL') {
                // Not an all side forum
                if ($side == 'NO') {
                    // No char
                    continue;
                } else {
                    if ($category['side_access'] != $side) {
                        // Forumside different of the user side
                        continue;
                    }
                }
            }
        }
        $output .= '
		<tr>
			<th class="head" align="left">' . $category['name'] . '<br />' . $category['description'] . '</th>
			<th class="head">' . $forum_lang['topics'] . '</th>
			<th class="head">' . $forum_lang['replies'] . '</th>
			<th class="head" align="right">' . $forum_lang['last_post'] . '</th>
		</tr>';
        $fid = $sqlm->query('
		SELECT forum, category, name, description, side_access, level_post_topic, level_read, level_post
		FROM mm_forum_forums
		WHERE category = ' . $category['category'] . '');
        while ($forum = $sqlm->fetch_assoc($fid)) {
            if ($forum['level_read'] > $user_lvl) {
                continue;
            }
            if ($user_lvl == 0 && $enablesidecheck) {
                if ($forum['side_access'] != 'ALL') {
                    // Not an all side forum
                    if ($side == 'NO') {
                        // No char
                        continue;
                    } else {
                        if ($forum['side_access'] != $side) {
                            // Forumside different of the user side
                            continue;
                        }
                    }
                }
            }
            $totaltopics = $sqlm->query('
				SELECT id
				FROM mm_forum_posts
				WHERE forum = ' . $forum['forum'] . ' AND id = topic');
            $numtopics = $sqlm->num_rows($totaltopics);
            $totalreplies = $sqlm->query('
				SELECT id
				FROM mm_forum_posts
				WHERE forum = ' . $forum['forum'] . '');
            $numreplies = $sqlm->num_rows($totalreplies);
            $output .= '
		<tr>
			<td align="left"><a href="forum.php?action=view_forum&amp;id=' . $forum['forum'] . '">' . $forum['name'] . '</a><br />' . $forum['description'] . '</td>
			<td>' . $numtopics . '</td>
			<td>' . $numreplies . '</td>';
            if (isset($lasts[$forum['forum']])) {
                $lasts[$forum['forum']]['name'] = htmlspecialchars($lasts[$forum['forum']]['name']);
                $output .= '
			<td align="right">
				<a href="forum.php?action=view_topic&amp;postid=' . $lasts[$forum['forum']]['id'] . '">' . $lasts[$forum['forum']]['name'] . '</a>
//.........这里部分代码省略.........
开发者ID:BACKUPLIB,项目名称:minimanager-1,代码行数:101,代码来源:forum_index.php


示例4: forum_do_add_topic

function forum_do_add_topic(&$sqlm)
{
    global $enablesidecheck, $forum_skeleton, $forum_lang, $user_lvl, $user_name, $user_id, $mmfpm_db, $minfloodtime;
    if ($enablesidecheck) {
        $side = get_side();
    }
    // Better to use it here instead of call it many time in the loop :)
    $sqlm = new SQL();
    $sqlm->connect($mmfpm_db['addr'], $mmfpm_db['user'], $mmfpm_db['pass'], $mmfpm_db['name']);
    $userposts = $sqlm->query('
			SELECT time
			FROM mm_forum_posts
			WHERE authorid = ' . $user_id . '
			ORDER BY id DESC
			LIMIT 1');
    if ($sqlm->num_rows($userposts) != 0) {
        $mintimeb4post = $sqlm->fetch_assoc($userposts);
        $mintimeb4post = time() - strtotime($mintimeb4post['time']);
        if ($mintimeb4post < $minfloodtime) {
            error($forum_lang['please_wait']);
        }
    }
    //==========================$_POST and SECURE=================================
    if (!isset($_POST['forum'])) {
        error($forum_lang['no_such_forum']);
    } else {
        $forum = $sqlm->quote_smart($_POST['forum']);
    }
    //==========================$_POST and SECURE end=============================
    $cat = 0;
    foreach ($forum_skeleton as $cid => $category) {
        foreach ($category['forums'] as $fid => $forum_) {
            if ($fid == $forum) {
                $cat = $cid;
            }
        }
    }
    if (empty($forum_skeleton[$cat]['forums'][$forum])) {
        error($forum_lang['no_such_forum']);
    }
    $forum_ = $forum_skeleton[$cat]['forums'][$forum];
    if ($forum_skeleton[$cat]['level_post_topic'] > $user_lvl || $forum_['level_post_topic'] > $user_lvl) {
        error($forum_lang['no_access']);
    }
    if ($user_lvl == 0 && $enablesidecheck) {
        if ($forum_skeleton[$cat]['side_access'] != 'ALL') {
            // Not an all side forum
            if ($side == 'NO') {
                // No char
                continue;
            } else {
                if ($forum_skeleton[$cat]['side_access'] != $side) {
                    // Forumside different of the user side
                    continue;
                }
            }
        }
        if ($forum_['side_access'] != 'ALL') {
            // Not an all side forum
            if ($side == 'NO') {
                // No char
                continue;
            } else {
                if ($forum_['side_access'] != $side) {
                    // Forumside different of the user side
                    continue;
                }
            }
        }
    }
    //==========================$_POST and SECURE=================================
    //  $_POST['msg'] = htmlspecialchars($_POST['msg']);
    $msg = trim($sqlm->quote_smart($_POST['msg']), " ");
    //  $_POST['name'] = htmlspecialchars($_POST['name']);
    $name = trim($sqlm->quote_smart($_POST['name']), " ");
    //==========================$_POST and SECURE end=============================
    if (strlen($name) > 49) {
        $sqlm->close();
        error($forum_lang['name_too_long']);
    }
    if (strlen($name) < 5) {
        $sqlm->close();
        error($forum_lang['name_too_short']);
    }
    if (strlen($msg) < 5) {
        $sqlm->close();
        error($forum_lang['msg_too_short']);
    }
    $msg = str_replace('\\n', '<br />', $msg);
    //  $msg = str_replace('\r', '<br />', $msg);
    $time = date("m/d/y H:i:s");
    $sqlm->query('
		INSERT INTO mm_forum_posts
			(authorid, authorname, forum, name, text, time)
		VALUES
			(\'' . $user_id . '\', \'' . $user_name . '\', \'' . $forum . '\', \'' . $name . '\', \'' . $msg . '\', \'' . $time . '\')');
    $id = $sqlm->insert_id();
    $sqlm->query('
		UPDATE mm_forum_posts
		SET topic = ' . $id . ', lastpost = ' . $id . '
//.........这里部分代码省略.........
开发者ID:BACKUPLIB,项目名称:minimanager-1,代码行数:101,代码来源:forum_topic_add.php


示例5: forum_do_add_post

function forum_do_add_post()
{
    global $enablesidecheck, $forum_skeleton, $forum_lang, $minfloodtime, $user_lvl, $user_name, $user_id, $mmfpm_db;
    if ($enablesidecheck) {
        $side = get_side();
    }
    // Better to use it here instead of call it many time in the loop :)
    $mysql = new SQL();
    $link = $link = $mysql->connect($mmfpm_db['addr'], $mmfpm_db['user'], $mmfpm_db['pass'], $mmfpm_db['name']);
    if ($minfloodtime > 0) {
        $userposts = $mysql->query("SELECT time FROM mm_forum_posts WHERE authorid = '{$user_id}' ORDER BY id DESC LIMIT 1;");
        if ($mysql->num_rows($userposts) != 0) {
            $mintimeb4post = $mysql->fetch_row($userposts);
            $mintimeb4post = time() - strtotime($mintimeb4post[0]);
            if ($mintimeb4post < $minfloodtime) {
                error($forum_lang["please_wait"]);
            }
        }
    }
    if (!isset($_POST['forum'])) {
        error($forum_lang["no_such_forum"]);
    } else {
        $forum = $mysql->quote_smart($_POST['forum']);
    }
    $cat = 0;
    foreach ($forum_skeleton as $cid => $category) {
        foreach ($category["forums"] as $fid => $forum_) {
            if ($fid == $forum) {
                $cat = $cid;
            }
        }
    }
    if (empty($forum_skeleton[$cat]["forums"][$forum])) {
        error($forum_lang["no_such_forum"]);
    }
    $forum_ = $forum_skeleton[$cat]["forums"][$forum];
    if (($user_lvl > 0 || !$closed) && ($forum_skeleton[$cat]["level_post"] > $user_lvl || $forum_["level_post"] > $user_lvl)) {
        error($forum_lang["no_access"]);
    }
    if ($user_lvl == 0 && $enablesidecheck) {
        if ($forum_skeleton[$cat]["side_access"] != "ALL") {
            // Not an all side forum
            if ($side == "NO") {
                // No char
                continue;
            } else {
                if ($forum_skeleton[$cat]["side_access"] != $side) {
                    // Forumside different of the user side
                    continue;
                }
            }
        }
        if ($forum_["side_access"] != "ALL") {
            // Not an all side forum
            if ($side == "NO") {
                // No char
                continue;
            } else {
                if ($forum_["side_access"] != $side) {
                    // Forumside different of the user side
                    continue;
                }
            }
        }
    }
    if (!isset($_POST['topic'])) {
        error($forum_lang["no_such_topic"]);
    } else {
        $topic = $mysql->quote_smart($_POST['topic']);
    }
    //  $_POST['msg'] = htmlspecialchars($_POST['msg']);
    $msg = trim($mysql->quote_smart($_POST['msg']), " ");
    $msg = str_replace('\\n', '<br />', $msg);
    //  $msg = str_replace('\r', '<br />', $msg);
    if (strlen($msg) < 5) {
        $mysql->close();
        error($forum_lang["msg_too_short"]);
    }
    $name = $mysql->query("SELECT name FROM mm_forum_posts WHERE id = '{$topic}';");
    $name = $mysql->fetch_row($name);
    $name = $mysql->quote_smart($name[0]);
    $time = date("m/d/y H:i:s");
    $mysql->query("INSERT INTO mm_forum_posts (authorid, authorname, forum, topic, name, text, time) VALUES ('{$user_id}', '{$user_name}', '{$forum}', {$topic}, '{$name}', '{$msg}', '{$time}');");
    $id = @mysql_insert_id($link);
    $mysql->query("UPDATE mm_forum_posts SET lastpost = {$id} WHERE id = {$topic};");
    $mysql->close();
    redirect("forum.php?action=view_topic&id={$topic}");
    // Queries : 4
}
开发者ID:BACKUPLIB,项目名称:minimanager,代码行数:89,代码来源:forum.php


示例6: forum_view_topic

function forum_view_topic(&$sqlr, &$sqlc, &$sqlm)
{
    global $enablesidecheck, $forum_skeleton, $maxqueries, $forum_lang, $user_lvl, $user_id, $output, $realm_db, $characters_db, $mmfpm_db, $realm_id;
    if ($enablesidecheck) {
        $side = get_side();
    }
    // Better to use it here instead of call it many time in the loop :)
    $sqlm = new SQL();
    $sqlm->connect($mmfpm_db['addr'], $mmfpm_db['user'], $mmfpm_db['pass'], $mmfpm_db['name']);
    //==========================$_GET and SECURE=================================
    if (isset($_GET['id'])) {
        $id = $sqlm->quote_smart($_GET['id']);
        $post = false;
    } else {
        if (isset($_GET['postid'])) {
            $id = $sqlm->quote_smart($_GET['postid']);
            $post = true;
        } else {
            error($forum_lang['no_such_topic']);
        }
    }
    if (!isset($_GET['page'])) {
        $page = 0;
    } else {
        $page = $sqlm->quote_smart($_GET['page']);
    }
    // Fok you mathafoker haxorz
    //==========================$_GET and SECURE end=============================
    $start = $maxqueries * $page;
    if (!$post) {
        $posts = $sqlm->query('
			SELECT id, authorid, authorname, forum, name, text, time, annouced, sticked, closed
			FROM mm_forum_posts
			WHERE topic = ' . $id . '
			ORDER BY id ASC
			LIMIT ' . $start . ', ' . $maxqueries . '');
        $sqlr = new SQL();
        $sqlr->connect($realm_db['addr'], $realm_db['user'], $realm_db['pass'], $realm_db['name']);
        // need to update this query to use ' instead of "
        $query = "\r\n\t\t\tSELECT account, name, gender, race, class, level,\r\n\t\t\t\t(SELECT gmlevel\r\n\t\t\t\tFROM `{$realm_db['name']}`.account\r\n\t\t\t\tWHERE `{$realm_db['name']}`.account.id = `{$characters_db[$realm_id]['name']}`.characters.account) as gmlevel\r\n\t\t\tFROM `{$characters_db[$realm_id]['name']}`.characters\r\n\t\t\tWHERE totaltime IN \r\n\t\t\t\t(SELECT MAX(totaltime)\r\n\t\t\t\tFROM `{$characters_db[$realm_id]['name']}`.characters\r\n\t\t\t\tWHERE account IN (";
        while ($post = $sqlm->fetch_row($posts)) {
            $query .= "{$post['1']},";
        }
        mysql_data_seek($posts, 0);
        $query .= "\r\n\t\t\t\t\t0)\r\n\t\t\t\tGROUP BY account);";
        $sqlc = new SQL();
        $sqlc->connect($characters_db[$realm_id]['addr'], $characters_db[$realm_id]['user'], $characters_db[$realm_id]['pass'], $characters_db[$realm_id]['name']);
        $results = $sqlc->query($query);
        while ($avatar = $sqlc->fetch_assoc($results)) {
            $char_gender = str_pad(dechex($avatar['gender']), 8, 0, STR_PAD_LEFT);
            $avatars[$avatar['account']]['name'] = $avatar['name'];
            $avatars[$avatar['account']]['sex'] = $char_gender['race'];
            $avatars[$avatar['account']]['race'] = $avatar['race'];
            $avatars[$avatar['account']]['class'] = $avatar['class'];
            $avatars[$avatar['account']]['level'] = $avatar['level'];
            $avatars[$avatar['account']]['gm'] = $avatar['gmlevel'];
        }
        $replies = $sqlm->num_rows($posts);
        if ($replies == 0) {
            error($forum_lang['no_such_topic']);
        }
        $post = $sqlm->fetch_assoc($posts);
        $fid = $post['forum'];
        $cat = 0;
        $cid = $sqlm->query('
			SELECT category, name, description, side_access, level_post_topic, level_read, level_post
			FROM mm_forum_categories');
        while ($category = $sqlm->fetch_assoc($cid)) {
            $fid_ = $sqlm->query('
				SELECT forum, category, name, description, side_access, level_post_topic, level_read, level_post
				FROM mm_forum_forums
				WHERE category = ' . $category['category'] . '');
            while ($forum = $sqlm->fetch_assoc($fid_)) {
                if ($forum['forum'] == $fid) {
                    $cat = $forum['category'];
                }
                if (empty($forum['forum'])) {
                    error($forum_lang['no_such_forum']);
                }
                if ($category['level_read'] > $user_lvl || $forum['level_read'] > $user_lvl) {
                    error($forum_lang['no_access']);
                }
                if ($user_lvl == 0 && $enablesidecheck) {
                    if ($category['side_access'] != 'ALL') {
                        // Not an all side forum
                        if ($side == 'NO') {
                            // No char
                            continue;
                        } else {
                            if ($category['side_access'] != $side) {
                                // Forumside different of the user side
                                continue;
                            }
                        }
                    }
                    if ($forum['side_access'] != 'ALL') {
                        // Not an all side forum
                        if ($side == 'NO') {
                            // No char
                            continue;
//.........这里部分代码省略.........
开发者ID:BACKUPLIB,项目名称:minimanager-1,代码行数:101,代码来源:forum_topic_view.php


示例7: forum_do_add_post

function forum_do_add_post()
{
    global $enablesidecheck, $forum_skeleton, $minfloodtime, $user_lvl, $user_name, $user_id, $corem_db, $sql;
    if ($enablesidecheck) {
        $side = get_side();
    }
    // Better to use it here instead of call it many time in the loop :)
    if ($minfloodtime > 0) {
        $userposts = $sql["mgr"]->query("SELECT time FROM forum_posts WHERE authorid='" . $user_id . "' ORDER BY id DESC LIMIT 1;");
        if ($sql["mgr"]->num_rows($userposts) != 0) {
            $mintimeb4post = $sql["mgr"]->fetch_row($userposts);
            $mintimeb4post = time() - strtotime($mintimeb4post[0]);
            if ($mintimeb4post < $minfloodtime) {
                error(lang("forum", "please_wait1") . " " . $minfloodtime . " " . lang("forum", "please_wait2"));
            }
        }
    }
    if (!isset($_POST["forum"])) {
        error(lang("forum", "no_such_forum"));
    } else {
        $forum = $sql["mgr"]->quote_smart($_POST["forum"]);
    }
    $cat = 0;
    foreach ($forum_skeleton as $cid => $category) {
        foreach ($category["forums"] as $fid => $forum_) {
            if ($fid == $forum) {
                $cat = $cid;
            }
        }
    }
    if (empty($forum_skeleton[$cat]["forums"][$forum])) {
        error(lang("forum", "no_such_forum"));
    }
    $forum_ = $forum_skeleton[$cat]["forums"][$forum];
    if (($user_lvl > 0 || !$closed) && ($forum_skeleton[$cat]["level_post"] > $user_lvl || $forum_["level_post"] > $user_lvl)) {
        error(lang("forum", "no_access"));
    }
    if ($user_lvl == 0 && $enablesidecheck) {
        if ($forum_skeleton[$cat]["side_access"] != "ALL") {
            // Not an all side forum
            if ($side == "NO") {
                // No char
                continue;
            } elseif ($forum_skeleton[$cat]["side_access"] != $side) {
                // Forumside different of the user side
                continue;
            }
        }
        if ($forum_["side_access"] != "ALL") {
            // Not an all side forum
            if ($side == "NO") {
                // No char
                continue;
            } elseif ($forum_["side_access"] != $side) {
                // Forumside different of the user side
                continue;
            }
        }
    }
    if (!isset($_POST["topic"])) {
        error(lang("forum", "no_such_topic"));
    } else {
        $topic = $sql["mgr"]->quote_smart($_POST["topic"]);
    }
    $msg = trim($sql["mgr"]->quote_smart($_POST["msg"]), " ");
    //$msg = str_replace('\n', '<br />', $msg);
    if (strlen($msg) < 5) {
        error(lang("forum", "msg_too_short"));
    }
    $name = $sql["mgr"]->query("SELECT name FROM forum_posts WHERE id='" . $topic . "';");
    $name = $sql["mgr"]->fetch_row($name);
    $name = $sql["mgr"]->quote_smart($name[0]);
    $time = date("m/d/y H:i:s");
    $sql["mgr"]->query("INSERT INTO forum_posts (authorid, authorname, forum, topic, name, text, time) VALUES ('" . $user_id . "', '" . $user_name . "', '" . $forum . "', '" . $topic . "', '" . $name . "', '" . $msg . "', '" . $time . "');");
    $query = "SELECT id FROM forum_posts WHERE authorid='" . $user_id . "' AND topic='" . $topic . "' AND time='" . $time . "'";
    $result = $sql["mgr"]->query($query);
    $fields = $sql["mgr"]->fetch_assoc($result);
    $id = $fields["id"];
    //$id = @mysql_insert_id($sql["mgr"]);
    $sql["mgr"]->query("UPDATE forum_posts SET lastpost=" . $id . " WHERE id=" . $topic . ";");
    redirect("forum.php?action=view_topic&id=" . $topic);
    // Queries: 4
}
开发者ID:GlassFace,项目名称:CoreManager2,代码行数:83,代码来源:forum.php


示例8: db_query

         $akt_seite = $site;
         $nextsite = $i + 1;
         $prewsite = $i - 1;
         break;
     }
 }
 if ($site == "") {
     $start = 0;
     $akt_seite = 1;
     $site = 1;
     $nextsite = 2;
 }
 // BEGIN LIST CLAN RANKINGS
 $query = db_query("SELECT * FROM xcl_players left join xcl_players_rank using (pid) WHERE lid='{$ladderc}' AND points!='0' ORDER BY points desc, pid LIMIT {$start},{$prosite}");
 while ($data = mysql_fetch_array($query)) {
     if (get_side($data[countries]) == 1) {
         if ($data[points] > 699) {
             $button = "<img src=\"images/ts/red5n.gif\" alt=\"\" >";
         }
         if ($data[points] < 700 && $data[points] > 499) {
             $button = "<img src=\"images/ts/red4n.gif\" alt=\"\" >";
         }
         if ($data[points] < 500 && $data[points] > 299) {
             $button = "<img src=\"images/ts/red3n.gif\" alt=\"\" >";
         }
         if ($data[points] < 300 && $data[points] > 149) {
             $button = "<img src=\"images/ts/red2n.gif\" alt=\"\" >";
         }
         if ($data[points] < 150 && $data[points] > 0) {
             $button = "<img src=\"images/ts/red1n.gif\" alt=\"\" >";
         }
开发者ID:amjadtbssm,项目名称:xcc,代码行数:31,代码来源:ts.php


示例9: forum_view_forum

function forum_view_forum(&$sqlm)
{
    global $enablesidecheck, $forum_skeleton, $maxqueries, $forum_lang, $user_lvl, $output, $mmfpm_db;
    if ($enablesidecheck) {
        $side = get_side();
    }
    $sqlm = new SQL();
    $sqlm->connect($mmfpm_db['addr'], $mmfpm_db['user'], $mmfpm_db['pass'], $mmfpm_db['name']);
    //==========================$_GET and SECURE=================================
    if (!isset($_GET['id'])) {
        error($forum_lang['no_such_forum']);
    } else {
        $id = $sqlm->quote_smart($_GET['id']);
    }
    if (!isset($_GET['page'])) {
        $page = 0;
    } else {
        $page = $sqlm->quote_smart($_GET['page']);
    }
    $cat = 0;
    //==========================$_GET and SECURE end=============================
    $cid = $sqlm->query('
		SELECT category, name, description, side_access, level_post_topic, level_read, level_post
		FROM mm_forum_categories');
    while ($category = $sqlm->fetch_assoc($cid)) {
        $fid = $sqlm->query('
			SELECT forum, category, name, description, side_access, level_post_topic, level_read, level_post
			FROM mm_forum_forums
			WHERE category = ' . $category['category'] . '');
        while ($forum = $sqlm->fetch_assoc($fid)) {
            if ($forum['forum'] == $id) {
                $cat = $forum['category'];
            }
            if (empty($forum['forum'])) {
                error($forum_lang['no_such_forum']);
            }
            if ($category['level_read'] > $user_lvl || $forum['level_read'] > $user_lvl) {
                error($forum_lang['no_access']);
            }
            if ($user_lvl == 0 && $enablesidecheck) {
                if ($category['side_access'] != 'ALL') {
                    // Not an all side forum
                    if ($side == 'NO') {
                        // No char
                        continue;
                    } else {
                        if ($category['side_access'] != $side) {
                            // Forumside different of the user side
                            continue;
                        }
                    }
                }
                if ($forum['side_access'] != 'ALL') {
                    // Not an all side forum
                    if ($side == 'NO') {
                        // No char
                        continue;
                    } else {
                        if ($forum['side_access'] != $side) {
                            // Forumside different of the user side
                            continue;
                        }
                    }
                }
            }
        }
    }
    $start = $maxqueries * $page;
    $output .= '
<div class="top">
	<h1>' . $forum_lang['forums'] . '</h1>
</div>
';
    if ($forum[$category]['level_post_topic'] <= $user_lvl && $forum['level_post_topic'] <= $user_lvl) {
        $output .= '
<table class="hidden">
	<tr>
		<td>';
    }
    makebutton($forum_lang['new_topic'], 'forum.php?action=add_topic&amp;id=' . $id . '" type="def', 130);
    $output .= '
		</td>
	</tr>
</table>
<center>
<fieldset>
	<legend>
		<a href="forum.php">' . $forum_lang['forum_index'] . '</a> -> 
		<a href="forum.php">' . $category['name'] . '</a> -> 
		<a href="forum.php?action=view_forum&amp;id=' . $id . '">' . $forum['name'] . '</a>
	</legend>';
    $topics = $sqlm->query('
		SELECT id, authorid, authorname, name, annouced, sticked, closed
		FROM mm_forum_posts
		WHERE (forum = ' . $id . ' AND id = topic) OR annouced = 1 AND id = topic
		ORDER BY annouced DESC, sticked DESC, lastpost DESC
		LIMIT ' . $start . ', ' . $maxqueries . '');
    $result = $sqlm->query('
		SELECT topic as curtopic,
			(SELECT count(id)-1
//.........这里部分代码省略.........
开发者ID:BACKUPLIB,项目名称:minimanager-1,代码行数:101,代码来源:forum_forum_view.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP get_sidebar函数代码示例发布时间:2022-05-15
下一篇:
PHP get_show_item函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap