Example #1
0
        $data = array("aaData" => array());
        while ($aRow = mysql_fetch_array($rResult)) {
            $row = array();
            for ($i = 0; $i < $count; $i++) {
                /* General output */
                $row[] = $aRow[$i];
                if ($i == $count - 1) {
                    $row[] = '<input type="checkbox" id="' . $aRow[$hidden] . '" name="check_' . $aRow[$hidden] . '" class="check_arch" value="' . $aRow[$hidden] . '" />';
                }
            }
            $data['aaData'][] = $row;
        }
        break;
    case 'save_action':
        if ($action_id == '') {
            Addaction($action_name, $start_date, $end_date, $action_content);
        } else {
            saveaction($action_id, $action_name, $start_date, $end_date, $action_content);
        }
        break;
    default:
        $error = 'Action is Null';
}
$data['error'] = $error;
echo json_encode($data);
/* ******************************
 *	Request Functions
* ******************************
*/
function Addaction($action_name, $start_date, $end_date, $action_content)
{
Example #2
0
            for ($i = 0; $i < $count; $i++) {
                /* General output */
                $row[] = $aRow[$i];
                if ($i == $count - 1) {
                    $row[] = '<div class="callapp_checkbox">
                                  <input type="checkbox" id="callapp_checkbox_' . $aRow[$hidden] . '" name="check_' . $aRow[$hidden] . '" value="' . $aRow[$hidden] . '" class="check" />
                                  <label for="callapp_checkbox_' . $aRow[$hidden] . '"></label>
                              </div>';
                }
            }
            $data['aaData'][] = $row;
        }
        break;
    case 'save_action':
        if ($action_id == '') {
            Addaction($action_name, $start_date, $end_date, $action_content, $file, $rand_file, $edit_id);
        } else {
            saveaction($action_id, $action_name, $start_date, $end_date, $action_content);
        }
        break;
    default:
        $error = 'Action is Null';
}
$data['error'] = $error;
echo json_encode($data);
/* ******************************
 *	Request Functions
* ******************************
*/
function Addaction($action_name, $start_date, $end_date, $action_content, $file, $rand_file, $edit_id)
{