Example #1
0
                db_op_result($db, $result, __LINE__, __FILE__, $db_logging);
                $whichteam = $result->fields;
                echo "{$l_team_urejected} <strong>{$whichteam['team_name']}</strong><br><br>";
                LINK_BACK();
                break;
            }
            $result = $db->Execute("SELECT * FROM {$db->prefix}teams WHERE id=?;", array($playerinfo['team']));
            db_op_result($db, $result, __LINE__, __FILE__, $db_logging);
            $whichteam = $result->fields;
            if ($playerinfo['team_invite']) {
                $result = $db->Execute("SELECT * FROM {$db->prefix}teams WHERE id=?;", array($playerinfo['team_invite']));
                db_op_result($db, $result, __LINE__, __FILE__, $db_logging);
                $whichinvitingteam = $result->fields;
            }
            $isowner = isTeamOwner($whichteam, $playerinfo);
            showinfo($playerinfo['team'], $isowner);
        }
        $res = $db->Execute("SELECT COUNT(*) as TOTAL FROM {$db->prefix}teams WHERE admin='N';");
        db_op_result($db, $res, __LINE__, __FILE__, $db_logging);
        $num_res = $res->fields;
        if ($num_res['TOTAL'] > 0) {
            DISPLAY_ALL_TEAMS();
        } else {
            echo $l_team_noteams . "<br><br>";
        }
        break;
}
// End of switch.
echo "<br><br>";
TEXT_GOTOMAIN();
function isTeamMember($team, $playerinfo)
Example #2
0
		<div id="logo">
			<h1><a href="#">Luying</a></h1>
			<span>cs242 Final Project</span>
		</div>
		<div id="menu">
			<ul>
				<li ><a href="index.php" accesskey="1" title="">Homepage</a></li>
				<li class="current_page_item"><a href="info.php" accesskey="1" title="">Currently Watching Info</a></li>
		</div>
	</div>
	<div id="main">
			<h1>Info Page</h1>

		<div id="featured">
		 <div>
          <?php 
include 'parse.php';
//get id from the info.php
$newid = $_GET['id'];
$vid = $_GET['show_id'];
showinfo('http://api.douban.com/v2/movie/subject/' . $newid);
videoinfo('http://openapi.youku.com/v2/shows/videos.json?client_id=ce905694ae10ccab&show_id=' . $vid);
?>
		 </div>
		</div>

	</div>
</div>
</body>
</html>
Example #3
0
                $res = cat(sanitize_input($_GET['file']));
            }
            break;
        case 'head':
            if (isset($_GET['file'])) {
                isset($_GET['lines']) and $lines = sanitize_input($_GET['lines']) or $lines = 10;
                $res = catN(sanitize_input($_GET['file']), $lines);
            }
            break;
        case 'file':
            if (isset($_GET['file'])) {
                $res = fileinfo(sanitize_input($_GET['file']));
            }
            break;
        case 'info':
            if (isset($_GET['dir'])) {
                $res = showinfo(sanitize_input($_GET['dir']));
            } else {
                $res = showinfo('.');
            }
            break;
            /*case 'grep': if (isset($_GET['dir']) and isset($_GET['expr'])) {
            			
            			$res = grep($_GET['dir'],$_GET['expr']);
            		}
            		break;*/
    }
    $res[1] = sanitize_output($res[1]);
    //debug: error_log(implode(" ",$res));
    echo json_encode($res);
}
Example #4
0
			if ($playerinfo[team] < 0) {
				$playerinfo[team] = -$playerinfo[team];
				$result = $db->Execute("SELECT * FROM $dbtables[teams] WHERE id=$playerinfo[team]");
				$whichteam = $result->fields;
				echo "$l_team_urejected <B>$whichteam[team_name]</B><BR><BR>";
 				LINK_BACK();
				break;
			}
			$result = $db->Execute("SELECT * FROM $dbtables[teams] WHERE id=$playerinfo[team]");
			$whichteam = $result->fields;;
			if ($playerinfo[team_invite]) {
				$result = $db->Execute("SELECT * FROM $dbtables[teams] WHERE id=$playerinfo[team_invite]");
				$whichinvitingteam = $result->fields;
			}
			$isowner = $playerinfo[player_id] == $whichteam[creator];
			showinfo($playerinfo[team],$isowner);
		}
		$res= $db->Execute("SELECT COUNT(*) as TOTAL FROM $dbtables[teams]");
		$num_res = $res->fields;
		if ($num_res[TOTAL] > 0) {
         DISPLAY_ALL_ALLIANCES();
		} else {
			echo "$l_team_noalliances<BR><BR>";
		}
	break;
} // switch ($teamwhat)

	echo "<BR><BR>";
	TEXT_GOTOMAIN();

	include("footer.php");
Example #5
0
foreach ($filters as $f) {
    echo '            <option value="' . $f->name . '"';
    if ($filter == $f->name) {
        echo ' selected="selected"';
    }
    echo '>' . htmlspecialchars($f->desc) . "</option>\n";
}
?>
           </select></div>
           <script type="text/javascript">
             var delayTimer = null;
             function delayAjax() {
               if (delayTimer) clearTimeout(delayTimer);
               delayTimer = setTimeout("doAjax()", 500);
             }
           </script>
           <div id='searchinput'> (and/or) Search: 
           <input type='text' name='search' id='searchtext' onkeypress='delayAjax()' />
           <input type='submit' value='Go' /></div>
         </div>
       </form>
     </div>

     <div id='ajaxsearch'>
     <?php 
require_once 'table.php';
showTable();
showinfo();
?>
     </div>