Beispiel #1
0
// 		UPDATE LEADS SCRIPT
// ------------------------------------------------------------ //
if (isset($_POST['lead_script_id'])) {
    $leads = new Leads();
    if (strpos($_POST['lead_script_id'], 'lead-script') === 0) {
        $arr = explode('-', str_replace('lead-script-', '', $_POST['lead_script_id']));
        $update['table_col'] = $arr[0];
        $update['row_id'] = $arr[1];
        //$update['row_id'] = str_replace('title-', '', $_POST['title']) ;
        $update['user_title'] = $_POST['title'];
        $update['db_table'] = 'script';
        //echo 'editing TITLE: ';
        //echo $photos->updateUserEmail($update);
        //print_r($_POST);
        //echo '<hr>';
        echo $leads->updateDB($update);
    }
    // print_r($update);
    // exit;
}
// edit file
if (isset($_POST['file'])) {
    $leads = new Files();
    // print_r($_POST);
    // parse ID
    $arr = explode('-', $_POST['id']);
    $update['table_col'] = $arr[0];
    $update['row_id'] = $arr[2];
    //$update['row_id'] = str_replace('title-', '', $_POST['title']) ;
    $update['user_title'] = $_POST['file'];
    $update['db_table'] = 'files';