File indexing completed on 2024-12-22 05:33:22
0001 <?php 0002 0003 include("gfx3/lib.php"); 0004 0005 $gameid = EHeaderDataParser::db_get("id"); 0006 0007 EStructure::load("game"); 0008 0009 $client = new OCSClient(); 0010 $data = $client->get("v1/content/data/$gameid/"); 0011 0012 if(EUser::nick()==$data["ocs"]["data"]["content"]["personid"]){ 0013 EStructure::module("mod_game_menu","mod_game"); 0014 } 0015 0016 EStructure::code(); 0017 echo stripslashes($data["ocs"]["data"]["content"]["name"]); 0018 Estructure::insert("game_title"); 0019 0020 EStructure::code(); 0021 echo stripslashes($data["ocs"]["data"]["content"]["summary"]); 0022 Estructure::insert("game_summary"); 0023 0024 //features 0025 EStructure::code(); 0026 echo stripslashes($data["ocs"]["data"]["content"]["description"]); 0027 Estructure::insert("game_description"); 0028 0029 EStructure::code(); 0030 echo stripslashes($data["ocs"]["data"]["content"]["changelog"]); 0031 Estructure::insert("game_changelog"); 0032 0033 EStructure::code(); 0034 $person = $data["ocs"]["data"]["content"]["personid"]; 0035 echo "<a data-toggle=\"modal\" href=\"#viewSelfProfileModal\" class=\"modalButton bold\" target=\"/viewProfileModal.php?login=$person\">$person</a>"; 0036 Estructure::insert("game_author"); 0037 0038 EStructure::code(); 0039 echo stripslashes($data["ocs"]["data"]["content"]["version"]); 0040 Estructure::insert("game_version"); 0041 0042 EStructure::code(); 0043 echo "<div class=\"active item\"><img src=\"".$data["ocs"]["data"]["content"]["preview1"]."\" class=\"myradius\"> 0044 </div> 0045 <div class=\"item\"><img src=\"".$data["ocs"]["data"]["content"]["preview2"]."\" class=\"myradius\"> 0046 </div> 0047 <div class=\"item\"><img src=\"".$data["ocs"]["data"]["content"]["preview3"]."\" class=\"myradius\"> 0048 </div>"; 0049 EStructure::insert("carousel_images"); 0050 0051 EStructure::code(); 0052 if(!empty($data["ocs"]["data"]["content"]["downloadlink1"])){ 0053 echo "<a class=\"btn btn-primary\" href=\"".$data["ocs"]["data"]["content"]["downloadlink1"]."\"><i class=\"icon-download icon-white\"></i> ".$data["ocs"]["data"]["content"]["downloadname1"]."</a>"; 0054 } 0055 EStructure::insert("download_button"); 0056 0057 EStructure::code(); 0058 if(EUser::logged()){ 0059 $client->set_auth_info(EUser::nick(),EUser::password()); 0060 $isfan = $client->get("v1/fan/status/$gameid"); 0061 if($isfan["ocs"]["data"]["status"]=="notfan"){ 0062 echo "<a class=\"btn btn-success\" href=\"/becomeFan.php?id=$gameid\"><i class=\"icon-thumbs-up icon-white\"></i> Like this!</a>"; 0063 } else { 0064 echo "<a class=\"btn btn-success\" href=\"/removeFan.php?id=$gameid\"><i class=\"icon-thumbs-down icon-white\"></i> Don't like 0065 this!</a>"; 0066 } 0067 } else { 0068 echo "<a class=\"btn btn-success\" href=\"#\"><i class=\"icon-thumbs-up icon-white\"></i> Log in to vote!</a>"; 0069 } 0070 EStructure::insert("becomefan_button"); 0071 0072 EStructure::code(); 0073 $score = $data["ocs"]["data"]["content"]["score"]; 0074 echo "<div class=\"dynamic-rating\" id=\"".$score."_".$gameid."\"></div>"; 0075 EStructure::insert("setscore_button"); 0076 0077 EStructure::code(); 0078 $score = $data["ocs"]["data"]["content"]["score"]; 0079 echo "<div class=\"static-rating\" id=\"".$score."_".$gameid."\"></div>"; 0080 EStructure::insert("averagescore"); 0081 0082 EStructure::code(); 0083 $comments = $client->get("v1/comments/data/1/$gameid/1&page=1&pagesize=10"); 0084 0085 if(isset($comments["ocs"]["data"]["comment"])){ 0086 foreach($comments["ocs"]["data"]["comment"] as $comment){ 0087 echo "<div class=\"span6 columns\"> 0088 <h4>".EUtility::stripslashes($comment["subject"])."</h4> 0089 <div class=\"span6\">".EUtility::stripslashes($comment["text"])."</div> 0090 written by <a data-toggle=\"modal\" href=\"#viewSelfProfileModal\" class=\"modalButton bold\" target=\"/viewProfileModal.php?login=".$comment["user"]."\">".$comment["user"]."</a> 0091 <hr> 0092 </div>"; 0093 } 0094 } else { 0095 echo "No comments found :(."; 0096 } 0097 echo "<div class=\"span6 columns\"> 0098 <form class=\"form-vertical\" action=\"/addComment.php\" target=\"_self\" method=\"post\"> 0099 <table style=\"width:100%\"> 0100 <tr><td><input type=\"hidden\" name=\"type\" value=\"1\"> 0101 <input type=\"hidden\" name=\"content\" value=\"$gameid\"> 0102 <input type=\"hidden\" name=\"content2\" value=\"1\"> 0103 <input type=\"hidden\" name=\"parent\" value=\"0\"> 0104 <input type=\"text\" name=\"subject\" placeholder=\"Subject\" style=\"width:100%\"></td></tr> 0105 <br> 0106 <tr><td><textarea name=\"message\" class=\"input-xlarge\" style=\"width:100%\"></textarea><br></td></tr> 0107 <tr><td><input type=\"submit\" class=\"btn btn-warning\" value=\"Write\"></td></tr> 0108 </table> 0109 </form> 0110 </div>"; 0111 EStructure::insert("game_comments"); 0112 0113 EStructure::unload(); 0114 0115 ?>