Пример #1
0
    case 'create_service_user':
        $user_name = $_REQUEST['user_name'];
        $user_password = $_REQUEST['user_password'];
        $ip = $wsdl->what_is_my_ip();
        $su_name = $_REQUEST['su_name'];
        $su = $_REQUEST['su'];
        $sp = $_REQUEST['sp'];
        $wsdl_res = $wsdl->create_service_user($user_name, $user_password, $ip, $su_name, $su, $sp);
        if ($wsdl_res) {
            mysql_query("\n\t\t\t\t\t\t\tUPDATE \t\t`company_properties`\n\t\t\t\t\t\t \tSET\t\t\t`name`      = '{$user_name}',\n\t\t\t\t\t\t\t\t\t\t`password`\t= '{$user_password}',\n                    \t\t\t\t\t`ip`        = '{$ip}', \n                    \t\t\t\t\t`su_name`  \t= '{$su_name}',\n                    \t\t\t\t\t`su`        = '{$su}',\n                     \t\t\t\t\t`sp`        = '{$sp}'\n\t\t\t\t\t\t\tWHERE \t\t`id`\t\t= 1\n\t\t\t\t\t\t");
        } else {
            $error = 'ვერ მოხერხდა მომხმარებლის შექმნა!';
        }
        break;
    case 'chek_service_user':
        $s_user = $wsdl->chek_service_user();
        mysql_query("\n\t\t\t\t\t\tUPDATE \t\t`company_properties`\n\t\t\t\t\t \tSET\t\t\t`s_user_id` = {$s_user['s_user_id']},\n\t\t\t\t\t \t\t\t\t`un_id` \t= {$s_user['un_id']}\n\t\t\t\t\t\tWHERE \t\t`id`\t\t= 1\n\t\t\t\t\t");
        break;
    default:
        $error = 'Action is Null';
}
$data['error'] = $error;
echo json_encode($data);
/* ******************************
 *	WSDL Functions
 * ******************************
 */
function arrayToObject($d)
{
    if (is_array($d)) {
        /*