示例#1
0
文件: ajax.php 项目: HRNIT/paris2015
}
/*///////////// 
Change sponsor image
///////////////*/
if (isset($_POST['action']) && $_POST['action'] == 'edit_sponsor_image') {
    $the_main = new main\main();
    $result = $the_main->file_upload('sponsors/logos/', $_POST['sponsor_name']);
    if (isset($result['name'])) {
        $the_main->pic_upload(2, $_POST['sponsor_id'], $result['name'], $_POST['sponsor_name'] . ' Logo');
    }
}
if (isset($_POST['action']) && $_POST['action'] == 'edit_agenda_sponsor_image') {
    $the_main = new main\main();
    $result = $the_main->file_upload('agenda/sponsors/', $_POST['sponsor_name']);
    if (isset($result['name'])) {
        $the_main->pic_upload_agenda($_POST['sponsor_id'], $result['name'], $_POST['sponsor_name'] . ' Logo');
    }
}
/*///////////// 
Edit Sponsor Data
///////////////*/
if (isset($_POST['action']) && $_POST['action'] == 'edit_sponsor') {
    $the_main = new main\main();
    if (isset($_POST['sId']) && isset($_POST['edit_type'])) {
        $result = $the_main->edit_sponsor();
        if (isset($result)) {
            $_SESSION['Result'] = 'Success';
            echo 'Success';
        }
    }
}