예제 #1
0
function get_home_data()
{
    $result = '';
    if (is_user_logged_in()) {
        //$result .= '<a href="'.get_site_url().'/profile"  class="button radius submit link">My Profile</a>';
        //$response_array = json_decode(RESARRAY);
        $response_array = get_tabs_from_sales();
        if (count($response_array) > 0) {
            $tab_array = $response_array['TabList'];
            $api_array = $response_array['ApiList'];
            $i = 0;
            foreach ($tab_array as $each_tab) {
                if ($each_tab != "") {
                    $result .= '<a href="' . get_site_url() . '/object-list/?id=' . $api_array[$i] . '&obj_name=' . $each_tab . '"  class="button radius submit link">' . $each_tab . '</a>';
                }
                $i++;
            }
        }
        //$result .='<a href="#"  class="button radius submit link logouts">Logout</a>';
    }
    /*else{ 
      $result .='<a href="'.get_site_url().'/login"  class="button radius submit link">Login</a> <br>';
      
        } */
    return $result;
}
예제 #2
0
    }
    ?>
                            <li><a href="<?php 
    echo get_site_url();
    ?>
/login" class="<?php 
    echo $active_class;
    ?>
"><span>Login</span></a></li>
                            
                           
                        <?php 
}
if (is_user_logged_in()) {
    /** * Connects to salesforce * */
    $response_array = get_tabs_from_sales();
    $res_array = json_encode($response_array);
    define("RESARRAY", $res_array);
    if (count($response_array) > 0) {
        //var totalRecords = data.NumberofRec;
        /* if(count(totalRecords) >0)
           {
               $tab_array = $response_array['PluralList'];
           }
           else if(count(totalRecords) <1) 
           {
               $tab_array = $response_array['TabList'];
           }*/
        $tab_array = $response_array['PluralList'];
        //  $tab_array = $response_array['TabList'];
        //$tab_array = array("link1dfdfd dfdfd dfdfdsfsdf ", "link2dfdfdfdfsdfdfdf","link3","link4","link5","link6","link7","link8","link9","link10","link11","link1dfdfd dfdfd dfdfdsfsdf ", "link2dfdfdfdfsdfdfdf","link3","link4","link5","link6","link7","link8","link9","link10","link11");