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 $id = EHeaderDataParser::db_post("idcontent"); 0008 $name = EHeaderDataParser::db_post("name"); 0009 $downloadname1 = EHeaderDataParser::db_post("downloadname1"); 0010 $downloadlink1 = EHeaderDataParser::db_post("downloadlink1"); 0011 $description = EUtility::nl2br(EHeaderDataParser::db_post("description")); 0012 $version = EHeaderDataParser::db_post("version"); 0013 $summary = EHeaderDataParser::db_post("summary"); 0014 $changelog = nl2br(EHeaderDataParser::db_post("changelog")); 0015 0016 $postdata = array( 0017 "name" => $name, 0018 "summary" => $summary, 0019 "downloadname1" => $downloadname1, 0020 "downloadlink1" => $downloadlink1, 0021 "description" => $description, 0022 "version" => $version, 0023 "changelog" => $changelog 0024 ); 0025 0026 $client = new OCSClient(); 0027 $client->set_auth_info(EUser::nick(),EUser::password()); 0028 $mod = $client->post("v1/content/edit/$id",$postdata); 0029 0030 if($mod["ocs"]["meta"]["statuscode"]=="100"){ 0031 header("Location: $prevpage"); 0032 } else { 0033 ELog::pd($mod); 0034 die(); 0035 header("Location: $prevpage"); 0036 } 0037 0038 ?>