예제 #1
0
    $fb = trim(strip_tags($_POST['fb']));
}
$linkedin = "";
if (!empty($_POST['linkedin'])) {
    $linkedin = trim(strip_tags($_POST['linkedin']));
}
$company = "";
if (!empty($_POST['company'])) {
    $company = trim(strip_tags($_POST['company']));
}
$created_at = time();
$updated_at = time();
$photo_url = "";
$thumb_url = "";
if (!empty($name) && !empty($contact_no) && !empty($email) && !empty($sms) && !empty($address) && !empty($login_hash) && !empty($user_id)) {
    $user = $controllerUser->getUserByUserId($user_id);
    $login_hash = str_replace(" ", "+", $login_hash);
    if ($user != null) {
        if ($user->login_hash == $login_hash) {
            $agent = $controllerRestAgent->getAgentByUserId($user_id);
            $itm = new Agent();
            $itm->address = $address;
            $itm->contact_no = $contact_no;
            $itm->country = $country;
            $itm->created_at = $created_at;
            $itm->email = $email;
            $itm->name = $name;
            $itm->sms = $sms;
            $itm->updated_at = $updated_at;
            $itm->zipcode = $zipcode;
            $itm->photo_url = $photo_url;
예제 #2
0
              <tr>
                  <th>#</th>
                  <th >Name</th>
                  <th width="50%">Comment</th>
                  <th>Action</th>
              </tr>

          </thead>
          <tbody>
              <?php 
if ($reviews != null) {
    $ind = 1;
    foreach ($reviews as $review) {
        $extras = new Extras();
        $deleteUrl = $extras->encryptQuery2(KEY_SALT, 'review_id', $review->store_id, 'photo_id', $review->review_id, 'store_reviews_view.php');
        $user = $controllerUser->getUserByUserId($review->user_id);
        echo "<tr>";
        echo "<td>{$ind}</td>";
        echo "<td>{$user->full_name}</td>";
        echo "<td>{$review->review}</td>";
        echo "<td>\n                                    <button  class='btn btn-primary btn-xs' data-toggle='modal' data-target='#modal_{$review->review_id}'><span class='glyphicon glyphicon-remove'></span></button>\n                                    \n                                </td>";
        echo "</tr>";
        //<!-- Modal -->
        echo "<div class='modal fade' id='modal_{$review->review_id}' tabindex='-1' role='dialog' aria-labelledby='myModalLabel' aria-hidden='true'>\n\n                                      <div class='modal-dialog'>\n                                          <div class='modal-content'>\n                                              <div class='modal-header'>\n                                                    <button type='button' class='close' data-dismiss='modal' aria-hidden='true'>&times;</button>\n                                                    <h4 class='modal-title' id='myModalLabel'>Deleting Review</h4>\n                                              </div>\n                                              <div class='modal-body'>\n                                                    <p>Deleting this is not irreversible. Do you wish to continue?\n                                              </div>\n                                              <div class='modal-footer'>\n                                                  <button type='button' class='btn btn-default' data-dismiss='modal'>Close</button>\n                                                  <a type='button' class='btn btn-primary' href='{$deleteUrl}'>Delete</a>\n                                              </div>\n                                          </div>\n                                      </div>\n                                </div>";
        ++$ind;
    }
}
?>

          </tbody>