예제 #1
0
        if (mysql_errno($linkid)) {
            $rslt_arr = array("status" => "error", "response" => mysql_error($linkid));
        } else {
            $rslt_arr = array("affected_rows" => mysql_affected_rows($linkid), "result" => "User info has inserted.");
        }
        return $rslt_arr;
    }
}
$ob = new Analytics();
if (!isset($get['content_style'])) {
    $output = $ob->unknown();
} else {
    switch ($get['content_style']) {
        case 'user_count':
            if (!isset($get['content_type'])) {
                $ob->print_error(array("status" => "error", "response" => "Undefined Content Type."));
            }
            $output = $ob->get_user_count($get);
            break;
        case 'table_actions':
            $output = $ob->table_actions($get);
            break;
        case 'content_count':
            if (!isset($get['content_type'])) {
                $ob->print_error(array("status" => "error", "response" => "Undefined Content Type."));
            }
            if (!isset($get['uid'])) {
                $ob->print_error(array("status" => "error", "response" => "Undefined UID."));
            }
            $output = $ob->get_content_count($get);
            break;