<?php include S_SECTIONS . "/member/memberaccess.php"; if (!isset($inboxDelObj)) { include_once SITE_CLASS_APPLICATION . "class.UserDeletedInbox.php"; $inboxDelObj = new UserDeletedInbox(); } $val = $_POST['val']; //Prints($_SESSION['SESS_B2B_USER_TYPE_SHORT']);exit; $eUserType = $_SESSION['SESS_' . PRJ_CONST_PREFIX . '_USER_TYPE_SHORT']; $iUserId = $_SESSION['SESS_' . PRJ_CONST_PREFIX . '_ID']; if ($val != '') { $valArr = @explode(',', $val); foreach ($valArr as $key => $value) { $dmdtl = $inboxDelObj->getDetails('*', " AND iInboxId={$value} AND eUserType='{$eUserType}' AND iUserId={$iUserId} "); if (is_array($dmdtl) && count($dmdtl) > 0) { $Data = array('eViewed' => 'No'); // $inboxDelObj->setAllVar($Data); // $vrfres = $inboxDelObj->insert(); $vrfres = $inboxDelObj->updateData($Data, " iDelInboxId=" . $dmdtl[0]['iDelInboxId'] . " "); } else { $Data = array('iUserId' => $iUserId, 'eUserType' => $eUserType, 'iInboxId' => $value, 'eViewed' => 'No'); $inboxDelObj->setAllVar($Data); $vrfres = $inboxDelObj->insert(); } } if ($vrfres) { $msg = $smarty->get_template_vars('MSG_INBOX_MSG_DELETED_SUCC'); } else { $msg = $smarty->get_template_vars('MSG_INBOX_MSG_DELETE_ERROR'); }
<?php include S_SECTIONS . "/member/memberaccess.php"; if (!isset($inboxDelObj)) { include_once SITE_CLASS_APPLICATION . "class.UserDeletedInbox.php"; $inboxDelObj = new UserDeletedInbox(); } //Prints($_SESSION);exit; $page = $_POST['page']; if (trim($page) == '' || trim($page) < 1) { $page = 1; } $search_key = isset($_POST['search_key']) ? $_POST['search_key'] : ''; $from = isset($_POST['from']) ? $_POST['from'] : ''; // $from = calcGTzTime($from, 'Y-m-d H:i:s'); $to = isset($_POST['to']) ? $_POST['to'] : ''; // $to = calcGTzTime($to, 'Y-m-d H:i:s'); //prints($_REQUEST); $sess_id = $_SESSION['SESS_' . PRJ_CONST_PREFIX . '_ID']; $curViewedInbox = isset($_SESSION['SESS_' . PRJ_CONST_PREFIX . '_INBOX_VIEWED']) ? $_SESSION['SESS_' . PRJ_CONST_PREFIX . '_INBOX_VIEWED'] : ''; switch ($_SESSION['SESS_' . PRJ_CONST_PREFIX . '_USER_TYPE_SHORT']) { case "SM": $sessType = 'SM'; $where = ' AND ((iCreatedBy <> \'' . $sess_id . '\' AND eCreatedType = \'' . $sessType . '\') OR eCreatedType = \'OA\' OR eCreatedType = \'OU\') '; break; case "OA": $sessType = 'OA'; $where .= ' AND ((eCreatedType = \'OA\' AND iCreatedBy <> \'' . $sess_id . '\') OR eCreatedType = \'OU\') AND iOrganizationId=' . $curORGID; break; case "OU": $sessType = 'OU';
$id = $_GET['id']; $where = " AND iVerifiedID={$id}"; /*if($sess_usertype_short != 'SM'){ $where .= " AND iOrganizationId=$curORGID "; }*/ $sql_res = 'CALL GetInbox("' . $sess_usertype_short . '","' . $where . '","","' . $orderBy . '","")'; $res = $dbobj->Onlyquery($sql_res); $curViewedsess = isset($_SESSION['SESS_' . PRJ_CONST_PREFIX . '_INBOX_VIEWED']) ? $_SESSION['SESS_' . PRJ_CONST_PREFIX . '_INBOX_VIEWED'] : ''; if (!@in_array($id, $curViewedsess)) { $_SESSION['SESS_' . PRJ_CONST_PREFIX . '_INBOX_VIEWED'][] = $id; } // prints($res);exit; // set as viewed if (!isset($inboxDelObj)) { include_once SITE_CLASS_APPLICATION . "class.UserDeletedInbox.php"; $inboxDelObj = new UserDeletedInbox(); } $dmdtl = $inboxDelObj->getDetails('*', " AND iInboxId={$id} AND eUserType='{$sess_usertype_short}' AND iUserId={$sess_id} "); if (is_array($dmdtl) && count($dmdtl) < 1) { $dtl = array('iUserId' => $sess_id, 'eUserType' => $sess_usertype_short, 'iInboxId' => $id, 'eViewed' => 'Yes'); // prints($dtl); exit; $inboxDelObj->setAllVar($dtl); $vrfres = $inboxDelObj->insert(); } if ($HAVE_HTACCESS == 'No') { // prints($res); // $res[0]['tMailContent_en'] = preg_replace('/\<a(.*)'.SITE_URL.'/$',SITE_URL_DUM,$res[0]['tMailContent_en']); $res[0]['tMailContent_en'] = str_replace(SITE_URL, SITE_URL_DUM, $res[0]['tMailContent_en']); $res[0]['tMailContent_fr'] = str_replace(SITE_URL, SITE_URL_DUM, $res[0]['tMailContent_fr']); $res[0]['tMailContent_fr'] = str_replace(SITE_URL, SITE_URL_DUM, $res[0]['tMailContent_fr']); }