Example #1
0
<?php

$user_type = '';
if ($users) {
    $user_type = isset($_POST['user_type']) ? $_POST['user_type'] : 'agent';
    echo '<div class="right cols2">
    	<div id="property_search_results">
        	<h1 class="property_search_results_top">' . count($users) . ' ' . $user_type . 's Found <span class="right"></span> </h1>
            <div id="user-results">';
    foreach ($users as $user) {
        if (isset($images[$user->id])) {
            $image = $images[$user->id];
        }
        $userProfile = userApi::getUserProfileDetails($user->id);
        ?>
			<?php 
        $profile = null;
        if ($user_type == "agent") {
            $profile = AgentProfileApi::getAgentDetails($user->id);
        } elseif ($user_type == "builder") {
            $profile = BuilderProfileApi::getBuilderDetails($user->id);
            //echo '<pre>';var_dump($profile->company_name);die();
        } elseif ($user_type == "specialist") {
            $profile = SpecialistProfileApi::getSpecialistDetails($user->id);
        }
        ?>
			<div class="post" style="cursor:pointer;" onClick="location.href='<?php 
        echo Yii::app()->createAbsoluteUrl('/profile/' . $profile->id);
        ?>
'">
            <?php 
Example #2
0
//导入api数据
//$configApiId = "olgq7x4i";
echo "导入api数据开始\n";
$userApiImportParams = array('url' => $configJSONFileUrl);
$userApi = new userApi($configPrismUrl, $configUserKey, $configUserSecret);
$return = $userApi->import($userApiImportParams);
unset($userApi);
echo $return;
echo "\n";
$return = json_decode($return, 1);
$configApiId = $return['result']['apis'][0]['Id'];
echo "导入api数据结束\n";
//app设置相关
echo "app设置相关开始\n";
$userApiSetConfParams = array('Id' => $configApiId, 'key' => 'token', 'value' => $configToken);
$userApi = new userApi($configPrismUrl, $configUserKey, $configUserSecret);
$return = $userApi->set_conf($userApiSetConfParams);
echo $return;
echo "\n";
$return = json_decode($return, 1);
echo "app设置相关结束\n";
//api上线
echo "api上线开始\n";
$adminApiOnlineParams = array('Id' => $configApiId);
$adminApi = new adminApi($configPrismUrl, $configAdminKey, $configAdminSecret);
$return = $adminApi->online($adminApiOnlineParams);
unset($adminApi);
echo $return;
echo "\n";
echo "api上线结束\n";
//用户创建应用