Exemplo n.º 1
0
                    return "<button type='button' class='btn-sm btn-info' onClick='edit_res_modal(" . $res_resource_id . ");'><i class='glyphicon glyphicon-edit text-white'></i></button>\n                                                                        <a href='/resource/mentor_download_file/?res_id=" . $res_resource_id . "'> <button type='button' class='btn-sm btn-success'> <i class='glyphicon glyphicon-download-alt'></i></button></a>\n                                                                        <button type='button' class='btn-sm btn-danger' onClick='delete_resource(" . $res_resource_id . ");'><i class='glyphicon glyphicon-trash text-white'></i></button>";
                }
                break;
            default:
                return "some thing went wrong !";
                break;
        }
    }
    foreach ($resource_details as $res) {
        echo "<tr>";
        echo "<td>" . $count++ . "</td>";
        echo "<td>" . $res->resource_name . "</td>";
        echo "<td>" . $res->resource_link . "</td>";
        echo "<td>" . $res->resource_type . "</td>";
        echo "<td>" . $res->resource_tag . "</td>";
        echo "<td>" . set_button($user_role, $res->resource_id, $res->resource_type) . "</td>";
        // echo "<td>
        //         <button type='button' class='btn-sm btn-info' onClick='edit_res_modal(".$res->resource_id.");'><i class='glyphicon glyphicon-edit text-white'></i></button>
        //         <button type='button' class='btn-sm btn-danger' onClick='delete_resource(".$res->resource_id.");'><i class='glyphicon glyphicon-trash text-white'></i></button>
        //       </td>";
        echo "</tr>";
    }
}
?>
                                    </tbody>
                                    <tfoot>
                                        <tr>
                                            <th>SL.NO</th>
                                            <th>Resource Name</th>
                                            <th>Resource Link</th>
                                            <th>Resource Type</th>
Exemplo n.º 2
0
                                            <th>Status</th>
                                            <th>Manage Parent</th>
                                        </tr>
                                    </thead>
                                    <tbody>
                                            <?php 
$count = 1;
foreach ($parents_details as $res) {
    echo "<tr>";
    echo "<td>" . $count++ . "</td>";
    echo "<td>" . $res->registration_no . "</td>";
    echo "<td>" . $res->user_fname . "</td>";
    echo "<td>" . $res->user_email . "</td>";
    echo "<td>" . $res->user_phone . "</td>";
    echo "<td><small class='badge " . bgcolor($res->status_name) . "'>" . $res->status_name . "</small></td>";
    echo "<td>" . set_button($res->status_name, $res->user_id, $res->user_role) . "</td>";
    echo "</tr>";
}
function set_button($status_name, $user_id, $user_role)
{
    switch ($status_name) {
        case 'Active':
            return '';
            break;
        case 'Paid':
            return 'bg-green';
            break;
        case 'Pending Payment':
            return 'bg-yellow';
            break;
        case 'Email Not Verified':
Exemplo n.º 3
0
                                            <th>Area of Interest Name</th>
                                            <th>Area of Interest Description</th>
                                            <th>Area of Interest Fees</th>
                                            <th>Manage Area of Interests</th>
                                        </tr>
                                    </thead>
                                    <tbody>
                                        <?php 
$count = 1;
foreach ($subject_details as $res) {
    echo "<tr>";
    echo "<td>" . $count++ . "</td>";
    echo "<td>" . $res->subject_name . "</td>";
    echo "<td class='description'>" . $res->subject_description . "</td>";
    echo "<td><i class='fa fa-rupee'></i> " . $res->subject_fee . "</td>";
    echo "<td>" . set_button($res->subject_id, $res->resource_status) . "</td>";
    // echo "<td>
    //         <button type='button' class='btn-sm btn-info' onClick='edit_sub_modal(".$res->subject_id.");'><i class='glyphicon glyphicon-edit text-white'></i></button>
    //         <button type='button' class='btn-sm btn-danger' onClick='delete_subject(".$res->subject_id.");'><i class='glyphicon glyphicon-trash text-white'></i></button>
    //       </td>";
    echo "</tr>";
}
function set_button($subject_id, $resource_status)
{
    switch ($resource_status) {
        case NULL:
            return "<button type='button' class='btn-sm btn-info' onClick='edit_sub_modal(" . $subject_id . ");'><i class='glyphicon glyphicon-edit text-white'></i></button>\n                                                                <button type='button' class='btn-sm btn-danger' onClick='delete_subject(" . $subject_id . ");'><i class='glyphicon glyphicon-trash text-white'></i></button>\n                                                                ";
            break;
        case 'UnPublished':
            return " Area of Interest Mapped With Course ";
            break;
Exemplo n.º 4
0
            default:
                return "some thing went wrong !";
                break;
        }
    }
    foreach ($assessment_details as $res) {
        echo "<tr>";
        echo "<td>" . $count++ . "</td>";
        echo "<td>" . $res->registration_no . "</td>";
        echo "<td>" . $res->role_name . "</td>";
        echo "<td>" . $res->test_no . "</td>";
        echo "<td>" . $res->test_subject . "</td>";
        echo "<td>" . $res->test_name . "</td>";
        // echo "<td>".$res->no_of_questions."</td>";
        // echo "<td>".$res->test_duration." "."Mins</td>";
        echo "<td>" . set_button($user_role, $res->test_id) . "</td>";
        // echo "<td>
        //          <button type='button' class='btn-sm btn-success' onClick='ans_key_modal(".$res->test_id.");'>Answer Key</button>
        //          <button type='button' class='btn-sm btn-info' onClick='edit_assessment_modal(".$res->test_id.");'><i class='glyphicon glyphicon-edit text-white'></i></button>
        //          <button type='button' class='btn-sm btn-danger' onClick='delete_assessment(".$res->test_id.");'><i class='glyphicon glyphicon-trash text-white'></i></button>
        //       </td>";
        echo "</tr>";
    }
}
?>
                                    </tbody>
                                    <tfoot>
                                        <tr>
                                            <th>SL.NO</th>
                                            <th>REG NO</th>
                                            <th>User Role</th>
Exemplo n.º 5
0
                                        </tr>
                                    </thead>
                                    <tbody>
                                        <?php 
$count = 1;
if (isset($director_details)) {
    foreach ($director_details as $res) {
        echo "<tr>";
        echo "<td>" . $count++ . "</td>";
        echo "<td>" . $res->registration_no . "</td>";
        echo "<td>" . $res->user_fname . "</td>";
        echo "<td>" . $res->user_email . "</td>";
        echo "<td>" . $res->user_phone . "</td>";
        echo "<td>" . $res->group_subject_name . "</td>";
        echo "<td><small class='badge " . bgcolor($res->status_name) . "'>" . $res->status_name . "</small></td>";
        echo "<td>" . "<button type='button' class='btn-sm btn-info' onClick='edit_director_modal(" . $res->user_id . ");'><i class='glyphicon glyphicon-edit text-white'></i></button>" . " " . set_button($res->status_name, $res->user_id, $res->user_role) . "</td>";
        echo "</tr>";
    }
}
function set_button($status_name, $user_id, $user_role)
{
    // log_message('debug','#################### Role'.$user_role." User_id ".$user_id);
    switch ($status_name) {
        case 'Active':
            return "<button type='button' class='btn-sm btn-danger' onClick='de_activate_user(" . $user_id . "," . $user_role . ");'>De-Activate</button>";
            break;
        case 'Paid':
            return "";
            break;
        case 'Pending Payment':
            return "";