Пример #1
0
if (isset($_POST['action']) && $_POST['action'] == 'edit_press_image') {
    $the_main = new main\main();
    if (isset($_POST['entity_id']) && $_POST['entity_id'] == 6) {
        $location = "BlogSquad";
    } else {
        $location = "Analytics";
    }
    $sTag = explode(" ", $_POST['speaker_name']);
    if (isset($sTag[0])) {
        $speaker_tag = ucfirst($sTag[1]) . ucfirst($sTag[0][0]);
    } else {
        $speaker_tag = ucfirst($_POST['speaker_name']);
    }
    $result = $the_main->file_upload('press/' . $location . '/Photos/', $speaker_tag);
    if (isset($result['name'])) {
        $the_main->press_pic_upload($_POST['entity_id'], $_POST['speaker_id'], $result['name'], $speaker_tag . ' Picture');
    }
}
/*///////////// 
Speaker order
///////////////*/
/*

if(isset($_POST['action']) && $_POST['action'] == 'speaker_order'){
	$the_main = new main\main;
	
         foreach ($_POST['order'] as $order) {
			 $the_main->speaker_order($order[0], $order[1]);
			  
		  }