Advertisement
Guest User

Untitled

a guest
May 24th, 2016
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.52 KB | None | 0 0
  1. $issue_name = $this->input->post('issue_name');
  2. $issue_tagline = $this->input->post('issue_tagline');
  3. $issue_description = $this->input->post('issue_description');
  4. $issue_publish_on = $this->input->post('issue_publish_on');
  5. $issue_file = $this->input->post('issue_file');
  6. $issue_id = $this->input->post('issue_id');
  7.  
  8. $data2=array(
  9. 'imgdetail'=>$imgdetail ,
  10. 'username' =>$session_data['username'],
  11. 'appname'=> $this->appname,
  12. 'mode'=> $this->mode,
  13. 'appidentifier'=> $this->appidentifier,
  14. 'name' => $name,
  15. 'productid' => $productid,
  16. 'status'=>$status,
  17. 'description'=>$description,
  18. 'issue_name' => $issue_name,
  19. 'issue_tagline' => $issue_tagline,
  20. 'issue_description' => $issue_description,
  21. 'issue_file' => $issue_file,
  22. );
  23.  
  24. $this->load->helper('form');
  25. $this->load->view('issue_detail',$data2);
  26.  
  27.  
  28. echo '<pre>' .var_dump($issue_name).'</pre>';
  29. echo '<pre>' .var_dump($productid).'</pre>';
  30. echo '<pre>' .var_dump($issue_id).'</pre>';
  31.  
  32. $target_url = 'https://platform.twixlmedia.com/admin-api/1/upload';
  33.  
  34. $file_name_with_full_path = realpath($issue_file);
  35. $post3 = array(
  36. 'admin_api_key' => 'da06751194bc18cc60xxxxxxxxxxxx',
  37. 'app_key' => 'bd7cf04226c58723cac4xxxxxxxxx',
  38. 'issue_identifier' => $issue_id,
  39. 'issue_file' =>'@' . realpath($issue_file),
  40. 'issue_name' => $issue_name
  41. );
  42.  
  43. $ch3 = curl_init();
  44. curl_setopt($ch3, CURLOPT_URL, 'https://platform.twixlmedia.com/admin-api/1/upload');
  45. curl_setopt($ch3, CURLOPT_POST, 1);
  46. curl_setopt($ch3, CURLOPT_POSTFIELDS, http_build_query($post3));
  47. curl_setopt($ch3, CURLOPT_RETURNTRANSFER, 1);
  48. curl_setopt($ch3, CURLOPT_SSL_VERIFYPEER, false);
  49. $result3 = curl_exec($ch3);
  50. curl_close ($ch3);
  51. echo $result3;
  52.  
  53. <form class="editissueform" action="home/detail_issue" method="post" enctype="multipart/form-data">
  54. <label for="name">Name:</label>
  55. <input type="text" name="issue_name"><br>
  56. <label for="tagline">Tagline:</label>
  57. <input type="text" name="issue_tagline"><br>
  58. <label type"description">Description:</label>
  59. <input type="text" name="issue_description"><br>
  60. <label type"publishdate">Publish Date:</label>
  61. <input type="text" name="issue_publish_on"><br>
  62.  
  63. </div>
  64. <h4>Upload Publication</h4>
  65. <div class="issuedit">
  66.  
  67. <input type="file" name="issue_file" size="40" />
  68. <h7>Please Upload using pdf file format</h7>
  69.  
  70. </div>
  71. <br>
  72. <br>
  73. <input type="submit" name="submit" value="Save">
  74. </form>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement