<tr class="odd gradeX"> <td><?php echo $ex['name']; ?> </td> <td><?php echo $ex['public'] == 1 ? _l('Yes', $this) : _l('No', $this); ?> </td> <td><?php echo $ex['download']; ?> </td> <td><?php echo my_int_date($ex['created_date']); ?> </td> <td> <a class="btn btn-success btn-xs" href="<?php echo base_url(); ?> profile-update-extension/<?php echo $ex['extension_id']; ?> "><i class="icon-pencil"></i> <?php echo _l('Edit', $this); ?> </a> <?php if ($ex['status'] == 1 && $ex['public'] == 1) { ?>
echo _l('Action', $this); ?> </th> </tr> </thead> <tbody> <?php foreach ($data_list as $data) { ?> <tr class="gradeX"> <td><?php echo $data["name"]; ?> </td> <td><?php echo my_int_date($data["created_date"]); ?> </td> <td><?php echo $data["language_name"]; ?> </td> <td><i class="fa <?php echo $data["public"] == 1 ? "fa-check" : "fa-minus-circle"; ?> "></i></td> <td><i class="fa <?php echo $data["status"] == 1 ? "fa-check" : "fa-minus-circle"; ?> "></i></td> <td>
?> </td></tr> <tr><td height="10"></td></tr> <?php } ?> <tr><td><?php echo $body; ?> </td></tr> <?php if (isset($_SESSION['settings']["options"]["msg_footer"])) { ?> <tr><td height="10"></td></tr> <tr><td><?php echo str_replace(array('[--$company--]', '[--$date--]', '[--$smail--]'), array($_SESSION['settings']["company"], my_int_date(time()), $_SESSION['settings']["email"]), $_SESSION['settings']["options"]["msg_footer"]); ?> </td></tr> <?php } ?> </tbody> </table> </td> </tr> <tr ><td height="10"></td></tr> </table> </body> </html>
</div><div class="col-md-6 nopadd"><?php echo isset($extension['comment']) ? Convertnumber2farsi($extension['comment']) : ""; ?> </div></li> <li class="row"><div class="col-md-6 nopadd"><?php echo _l("Date added", $this); ?> </div><div class="col-md-6 nopadd"><?php echo isset($extension['created_date']) ? my_int_date($extension['created_date']) : ""; ?> </div></li> <li class="row"><div class="col-md-6 nopadd"><?php echo _l("Date Modified", $this); ?> </div><div class="col-md-6 nopadd"><?php echo isset($extension['updated_date']) ? my_int_date($extension['updated_date']) : ""; ?> </div></li> <?php if ($extension['price'] != 0) { ?> <li class="row"><div class="col-md-6"><?php echo _l("Price", $this); ?> </div><div class="col-md-6 nopadd"><?php echo isset($extension['price']) ? $this->currency->format($extension['price']) : $this->currency->format(0); ?> </div></li><?php } ?>
function addreply($is_extension = 0) { if ($is_extension) { $not_read = array(); $extension_detail = @reset($this->general_model->get_extension_by_id($_POST['reply_to'])); if ($extension_detail['user_id'] != $_SESSION['user']['user_id']) { $not_read[] = $extension_detail['user_id']; } $feed_reply_detail = $this->general_model->get_extension_reply_by_id($_POST['reply_to']); foreach ($feed_reply_detail as $feed_reply) { if ($feed_reply['user_id'] != $_SESSION['user']['user_id']) { $not_read[] = $feed_reply['user_id']; } } $not_read = implode(',', $not_read); $data = array('user_id' => $_SESSION['user']['user_id'], 'reply_to_extension' => $_POST['reply_to'], 'reply_to_feed' => 0, 'date_add' => time(), 'not_read' => $not_read, 'comment' => $_POST['commentfeed']); } else { $not_read = array(); $feed_detail = @reset($this->general_model->get_feed_by_id($_POST['reply_to'])); if ($feed_detail['user_id'] != $_SESSION['user']['user_id']) { $not_read[] = $feed_detail['user_id']; } $feed_reply_detail = $this->general_model->get_feed_reply_by_id($_POST['reply_to']); foreach ($feed_reply_detail as $feed_reply) { if ($feed_reply['user_id'] != $_SESSION['user']['user_id']) { $not_read[] = $feed_reply['user_id']; } } $not_read = implode(',', $not_read); $data = array('user_id' => $_SESSION['user']['user_id'], 'reply_to_extension' => 0, 'reply_to_feed' => $_POST['reply_to'], 'date_add' => time(), 'not_read' => $not_read, 'comment' => $_POST['commentfeed']); } $user_feed_id = $this->general_model->insert_comment_feed($data); $user = $this->general_model->get_user_by_user_id($data['user_id']); $settings = @reset($this->general_model->get_website_info()); $return_data = array(); $return_data['user_feed_id'] = $user_feed_id; $return_data['user_id'] = $data['user_id']; $return_data['avatar'] = base_url() . image($user[0]['avatar'], $settings['default_image'], 30, 30); $return_data['usernameurl'] = url_title($user[0]['username']); $return_data['username'] = $user[0]['username']; $return_data['date'] = my_int_date($data['date_add']); $return_data['comment'] = nl2br($data['comment']); echo json_encode($return_data); }
function reset_password($lang, $email_hash, $active_code) { $this->preset($lang); if ($email_hash != null && $active_code != null) { $user = $this->NodCMS_general_model->get_user_by_email_hash_and_active_code($email_hash, $active_code); if (isset($user) && $user["reset_pass_exp"] > time() && ($user["active"] == 0 || $user["active_register"] == 0)) { $this->data['data'] = $user; if (isset($_POST["password"])) { $redirect = $user["active_register"] == 0 ? "active_account" : "reset-password"; if (strlen($_POST["password"]) > 5 && strlen($_POST["password"]) < 13) { if (isset($_POST["confirm_password"]) && $_POST["confirm_password"] == $_POST["password"]) { $this->NodCMS_general_model->user_set_new_password($user["user_id"], md5($_POST["password"])); // Send email $search = array('[--$company--]', '[--$date--]', '[--$username--]', '[--$email--]', '[--$cdate--]'); $replace = array($this->data['settings']["company"], my_int_date(time()), $user['username'], $user['email'], $user['created_date']); $body_data = str_replace($search, $replace, $this->data['settings']['options']['msg_active']); $email_body = $this->load->view('nodcms_general/email-template-public', array('body' => $body_data), true); $this->sendEmailAutomatic($user["email"], _l("Change password confirmation!", $this), $email_body); $this->session->set_flashdata('message_success', _l("Your account is active now.", $this)); redirect(base_url() . $lang . "/login"); } else { $this->session->set_flashdata('message_error', _l("Password not match", $this)); } } else { $this->session->set_flashdata('message_error', _l("Password not match", $this)); } redirect(base_url() . $lang . "/" . $redirect . "/" . $email_hash . "/" . $active_code); } } else { show_404(); } } $this->data['title'] = _l("Set password", $this); $this->data['content'] = $this->load->view($this->mainTemplate . '/reset_password', $this->data, true); $this->load->view($this->mainTemplate, $this->data, ''); }