File indexing completed on 2024-12-22 05:33:22
0001 <?php 0002 0003 include("gfx3/lib.php"); 0004 0005 $prevpage = EPageProperties::get_previous_page(); 0006 0007 $name = EHeaderDataParser::db_post("name"); 0008 $type = EHeaderDataParser::db_post("type"); 0009 $downloadname1 = EHeaderDataParser::db_post("downloadname1"); 0010 $downloadlink1 = EHeaderDataParser::db_post("downloadlink1"); 0011 $description = EHeaderDataParser::db_post("description"); 0012 $summary = EHeaderDataParser::db_post("summary"); 0013 $version = EHeaderDataParser::db_post("version"); 0014 $changelog = EHeaderDataParser::db_post("changelog"); 0015 $personid = EUser::nick(); 0016 0017 $postdata = array( 0018 "name" => $name, 0019 "type" => $type, 0020 "downloadname1" => $downloadname1, 0021 "downloadlink1" => $downloadlink1, 0022 "description" => $description, 0023 "summary" => $summary, 0024 "version" => $version, 0025 "changelog" => $changelog, 0026 "personid" => $personid 0027 ); 0028 0029 $client = new OCSClient(EConfig::$data["ocs"]["host"]); 0030 $client->set_auth_info(EUser::nick(),EUser::password()); 0031 $check = $client->post("v1/content/add",$postdata); 0032 0033 if($check["ocs"]["meta"]["statuscode"]=="100"){ 0034 0035 $id = $check["ocs"]["data"]["content"]["id"]; 0036 //nothing hard insert into gamingfreedom database 0037 $pname = ERewriter::prettify($name); 0038 header("Location: game.php/title/$pname/id/$id"); 0039 0040 } else { 0041 echo $client->get_last_raw_result(); 0042 // redirecting to main page 0043 $message = $check["ocs"]["meta"]["message"]; 0044 $message = str_replace(" ","%20",$message); 0045 //header("Location: $prevpage?e=".$message); 0046 } 0047 0048 ?>