コード例 #1
0
$get_current_user_role_new = get_current_user_role();
if ($is_user_company_admin && strtolower($get_current_user_role_new) != 'staff') {
    ?>
        <a  class="colorbox-inline-70 btn btn-primary color-blue pull-right" href="#apply_for_new_accreditation"> Apply for New Accreditation</a>
			  <?php 
}
/*else if ( is_user_company_legal()){ ?>
  <a  class="colorbox-inline-70 btn btn-primary color-blue pull-right" href="#apply_for_new_accreditation"> Apply for New Accreditation</a>
  <?php }*/
?>
        
    <?php 
$sql = "select `id`, `name`, `doc_id` from " . $wpdb->prefix . "programs order by name asc";
$all_programs = $wpdb->get_results($sql);
if (strtolower($role) == 'staff') {
    $dboperations = Dboperations::getInstance();
    $all_programs = $dboperations->get_programs_by_staff_user_id(get_current_user_id());
}
echo "<script>var filter='';";
foreach ($all_programs as $all_program) {
    echo "filter +='<option name=" . $all_program->name . ">" . $all_program->name . "</option>';";
}
echo "</script>";
?>
        <div class="floating-line"></div>
    <div class="clearfix"></div>
        <div class="divider-15"></div>
    </div>
<div style='display:none'>
    <div id='apply_for_renew' style='padding:10px; background:#fff; width:100%; height: 500px; overflow-y:auto; overflow-x: hidden'>
        <h4 style="font-weight:bold; color: rgb(44,105,100);"> Coming soon </h4>
コード例 #2
0
function get_user_detail_by_id()
{
    global $wpdb;
    $query = "SELECT salutaions,company_id,first_name,last_name,title,user_email,phone,fax,company_name,address,country,city,state,zipcode from " . $wpdb->prefix . "users WHERE ID=" . $_POST['id'];
    $result = $wpdb->get_results($query);
    $dboperations = Dboperations::getInstance();
    $result[0]->country_name = $dboperations->get_country_by_id($result[0]->country);
    $result[0]->state_name = $dboperations->get_state_by_id($result[0]->state);
    if (!empty($result[0]->company_id)) {
        $result[0]->company_name = $dboperations->get_company_data_by_id($result[0]->company_id);
    } else {
        $result[0]->company_name = '';
    }
    echo json_encode($result);
    die;
}