예제 #1
0
     $notes2 = tep_db_prepare_input($_POST['notes2']);
     tep_db_perform('designs', array('designs_description' => $notes2), 'update', "designs_id='{$design->id}'");
     $result = array();
     $result['notes2'] = $notes2;
     ajaxReturn($result);
     exit;
 } elseif ($_POST['me_action'] == 'UPDATECOLORSREQUEST') {
     $cr = tep_db_prepare_input($_POST['colors_request']);
     $result = array();
     $result = $design->updateColorsRequest($session_userinfo['username'], $cr);
     ajaxReturn($result);
     exit;
 } elseif ($_POST['me_action'] == 'REMOVEFROMCOLORSREQUEST') {
     $cid = tep_db_prepare_input($_POST['color_id']);
     $result = array();
     $result['colors_removed'] = $design->removeFromColorsRequest($session_userinfo['username'], '', $cid);
     ajaxReturn($result);
     exit;
 } elseif ($_POST['me_action'] == 'UPLOADIMAGE') {
     $design = new design($id);
     if (isset($_FILES['image_1'])) {
         $image = $_FILES['image_1'];
         $imgno = '1';
         $img_title = 'Image 1';
     } elseif (isset($_FILES['image_2'])) {
         $image = $_FILES['image_2'];
         $imgno = '2';
         $img_title = 'Image 2';
     } elseif (isset($_FILES['image_3'])) {
         $image = $_FILES['image_3'];
         $imgno = '3';