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 $type = EHeaderDataParser::db_post("type");
0008 $content = EHeaderDataParser::db_post("content");
0009 $content2 = EHeaderDataParser::db_post("content2");
0010 $parent = EHeaderDataParser::db_post("parent");
0011 $subject = EHeaderDataParser::db_post("subject");
0012 $message = EHeaderDataParser::db_post("message");
0013 
0014 $postdata = array(
0015   "type" => $type,
0016   "content" => $content,
0017   "content2" => $content2,
0018   "parent" => $parent,
0019   "subject" => $subject,
0020   "message" => $message
0021   );
0022 
0023 $client = new OCSClient();
0024 $client->set_auth_info(EUser::nick(),EUser::password());
0025 $client->set_post_data($postdata);
0026 $res = $client->post("v1/comments/add");
0027 
0028 if($res["ocs"]["meta"]["statuscode"]=="100"){
0029   header("Location: game.php/id/$content");
0030 } else {
0031   ELog::pd($res);
0032 }
0033 
0034 ?>