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 $idcontent = EHeaderDataParser::db_post("idcontent");
0008 $n = EHeaderDataParser::db_post("number");
0009 
0010 if(!empty($_FILES['localfile'])){
0011   $client = new OCSClient();
0012   $client->set_auth_info(EUser::nick(),EUser::password());
0013   $client->set_upload_file($_FILES['localfile']['tmp_name']);
0014   $result = $client->post("v1/content/uploadpreview/$idcontent/$n");
0015   
0016   header("Location: $prevpage");
0017   
0018 }
0019 
0020 ?>