Advertisement
Guest User

Untitled

a guest
Sep 24th, 2017
165
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 16.52 KB | None | 0 0
  1. <?php
  2.  
  3.  
  4. /**
  5. * Main functions that are used in the application.
  6. */
  7.  
  8. function __autoload($class_name)
  9. {
  10. global $C;
  11. require_once( $C->INCPATH.'classes/class_'.$class_name.'.php' );
  12. }
  13.  
  14. function validateUrl($url)
  15. {
  16. if (!preg_match('/^(http|https):\/\/((([a-z0-9.-]+\.)+[a-z]{2,4})|([0-9\.]{1,4}){4})(\/([a-zA-Z?-?0-9-_\?\:%\.\?\!\=\+\&\/\#\~\;\,\@]+)?)?$/', $url))
  17. return FALSE;
  18. else return TRUE;
  19. }
  20.  
  21. //function that checks if a URL is or is not "http"
  22. function fitsUrl($url)
  23. {
  24.  
  25. if( ! preg_match('/^(ftp|http|https):\/\//', $url) ) {
  26. $url = 'http://'.$url;
  27. }
  28.  
  29. if( !validateUrl($url) ) return FALSE;
  30.  
  31. return $url;
  32. }
  33.  
  34. // function that returns the code of a YouTube video
  35. function getCodeYoutube($url, $lencodyt)
  36. {
  37. if( preg_match('/^http(s)?\:\/\/(www\.|de\.)?youtu\.be\/([a-z0-9-\_]{3,})/i', $url, $resultado) ) {
  38. $codeyt = $resultado[3];
  39. if (strlen($codeyt)!=$lencodyt) return FALSE;
  40. else return $codeyt;
  41. }
  42. if( preg_match('/^http(s)?\:\/\/(www\.|de\.)?youtube\.com\/watch\?(feature\=player\_embedded&)?v\=([a-z0-9-\_]{3,})/i', $url, $resultado) ) {
  43. $codeyt = $resultado[4];
  44. if (strlen($codeyt)!=$lencodyt) return FALSE;
  45. else return $codeyt;
  46. }
  47. return FALSE;
  48. }
  49.  
  50. function emailValid($e)
  51. {
  52. return preg_match('/^[a-zA-Z0-9._%-]+@([a-zA-Z0-9.-]+\.)+[a-zA-Z]{2,4}$/u', $e);
  53. }
  54.  
  55.  
  56. // Function that checks if a code is already registered in a table
  57. function verifyCode($code, $table, $field)
  58. {
  59. $mibdx2 = $GLOBALS["db2"];
  60.  
  61. // check whether the code is being used
  62. $rx2 = $mibdx2->query("SELECT ".$field." FROM ".$table." WHERE ".$field."='".$code."' LIMIT 1");
  63. $numusers = $mibdx2->num_rows($rx2);
  64.  
  65. if ($numusers==0) return FALSE;
  66. else return TRUE;
  67. }
  68.  
  69. //*************************************************************************
  70. // Function that returns a random string.
  71. // $numcharacters: number of letters returned string will.
  72. // $withrepeated: if 0 returns a string with no letters repeated.
  73. // $withrepeated: if 1 returns a string with repeated letters.
  74. function getCode($numcharacters,$withrepeated)
  75. {
  76. $code = '';
  77. $characters = "0123456789abcdfghjkmnpqrstvwxyzBCDFGHJKMNPQRSTVWXYZ";
  78. $i = 0;
  79. while ($i < $numcharacters) {
  80. $char = substr($characters, mt_rand(0, strlen($characters)-1), 1);
  81. if ($withrepeated == 1) {
  82. $code .= $char;
  83. $i += 1;
  84. } else {
  85. if(!strstr($code,$char)) {
  86. $code .= $char;
  87. $i += 1;
  88. }
  89. }
  90. }
  91. return $code;
  92. }
  93. //*************************************************************************
  94.  
  95. // Function that seeks a 11 digit code that is not registered in a table.
  96. function uniqueCode($numcharacters, $withrepeated, $table, $field)
  97. {
  98. $code = getCode($numcharacters, $withrepeated);
  99. while (verifyCode($code, $table, $field)) {
  100. $code = getCode(11, 1);
  101. }
  102. return $code;
  103. }
  104. //*************************************************************************
  105.  
  106. function dateago($thetime)
  107. {
  108. global $page;
  109. //if (empty($thetime)) return $page->lang('global_time_end',array('#TXTEND#'=>'1 '.$page->lang('global_time_sec')));
  110. $today = time();
  111. $datediff = abs($today - $thetime);
  112. if ($datediff <= 0) $datediff = 1;
  113. $txtago = '';
  114. $years = floor($datediff / (365*60*60*24));
  115. $months = floor(($datediff - $years * 365*60*60*24) / (30*60*60*24));
  116. $days = floor(($datediff - $years * 365*60*60*24 - $months*30*60*60*24)/ (60*60*24));
  117. $hours= floor($datediff/3600);
  118. $minutes= floor($datediff/60);
  119. $seconds= floor($datediff);
  120. //year checker
  121. if( $txtago == '' ) {
  122. if( $years > 1 ) $txtago = $years.' '.$page->lang('global_time_yeas');
  123. elseif( $years == 1 ) $txtago = $years.' '.$page->lang('global_time_yea');
  124. }
  125. //month checker
  126. if( $txtago == '') {
  127. if( $months > 1 ) $txtago = $months.' '.$page->lang('global_time_mons');
  128. elseif( $months == 1 ) $txtago = $months.' '.$page->lang('global_time_mon');
  129. }
  130. //month checker
  131. if( $txtago == '') {
  132. if( $days > 1 ) $txtago = $days.' '.$page->lang('global_time_days');
  133. elseif( $days == 1 ) $txtago = $days.' '.$page->lang('global_time_day');
  134. }
  135. //hour checker
  136. if( $txtago == '' ) {
  137. if( $hours > 1 ) $txtago = $hours.' '.$page->lang('global_time_hous');
  138. elseif( $hours == 1 ) $txtago = $hours.' '.$page->lang('global_time_hou');
  139. }
  140. //minutes checker
  141. if( $txtago == '') {
  142. if( $minutes > 1 ) $txtago = $minutes.' '.$page->lang('global_time_mins');
  143. elseif( $minutes == 1 ) $txtago = $minutes.' '.$page->lang('global_time_min');
  144. }
  145. //seconds checker
  146. if( $txtago == '') {
  147. if( $seconds > 1 ) $txtago = $seconds.' '.$page->lang('global_time_secs');
  148. elseif( $seconds == 1 ) $txtago = $seconds.' '.$page->lang('global_time_sec');
  149. }
  150. return $page->lang('global_time_end',array('#TXTEND#'=>$txtago));
  151. }
  152.  
  153. //*************************************************************************
  154.  
  155. function analyzeMessage($txtmsg) {
  156. global $C;
  157. // Parse any @mentions or links
  158.  
  159. $analyzedText = preg_replace(array('/(?i)\b((?:https?:\/\/|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:\'".,<>?«»“”‘’]))/', '/(^|[^a-z0-9_])@([a-z0-9_]+)/i', '/(^|[^a-z0-9_])#(\w+)/u'), array('<a href="$1" target="_blank" rel="nofollow" class="linkblue">$1</a>', '$1<span class="linkblue3"><a href="'.$C->SITE_URL.'$2">@$2</a></span>', '$1<span class="linkblue3"><a href="'.$C->SITE_URL.'search/t%%%$2">#$2</a></span>'), ($txtmsg));
  160.  
  161.  
  162. // Define smiles
  163. $emoticons = array(
  164. ':-)' => 'regular.png',
  165. ':)' => 'regular.png',
  166. ':-D' => 'teeth.png',
  167. ':d' => 'teeth.png',
  168. ':D' => 'teeth.png',
  169. ':-O' => 'omg.png',
  170. ':o' => 'omg.png',
  171. ':O' => 'omg.png',
  172. ':-P' => 'tongue.png',
  173. ':p' => 'tongue.png',
  174. ':P' => 'tongue.png',
  175. ';-)' => 'wink.png',
  176. ';)' => 'wink.png',
  177. ':((' => 'cry.png',
  178. ':-(' => 'sad.png',
  179. ':(' => 'sad.png',
  180. ':-S' => 'confused.png',
  181. ':s' => 'confused.png',
  182. ':S' => 'confused.png',
  183. ':-|' => 'what.png',
  184. ':|' => 'what.png',
  185. ':-$' => 'red.png',
  186. ':$' => 'red.png',
  187. '(H)' => 'shades.png',
  188. '(h)' => 'shades.png',
  189. ':-@' => 'angry.png',
  190. ':@' => 'angry.png',
  191. '(A)' => 'angel.png',
  192. '(a)' => 'angel.png',
  193. '(6)' => 'devil.png',
  194. ':-#' => 'dumb.png',
  195. '8o|' => 'growl.png',
  196. '8-|' => 'nerd.png',
  197. '^o)' => 'sarcastic.png',
  198. ':-*' => 'secret.png',
  199. '+o(' => 'sick.png',
  200. ':^)' => 'noknow.png',
  201. '*-)' => 'pensive.png',
  202. '8-)' => 'eyesrolled.png',
  203. '|-)' => 'sleepy.png',
  204. '(C)' => 'coffee.png',
  205. '(c)' => 'coffee.png',
  206. '(Y)' => 'thumbs_up.png',
  207. '(y)' => 'thumbs_up.png',
  208. '(n)' => 'thumbs_down.png',
  209. '(N)' => 'thumbs_down.png',
  210. '(B)' => 'beer_mug.png',
  211. '(b)' => 'beer_mug.png',
  212. '(D)' => 'martini.png',
  213. '(d)' => 'martini.png',
  214. '(X)' => 'girl.png',
  215. '(x)' => 'girl.png',
  216. '(Z)' => 'guy.png',
  217. '(z)' => 'guy.png',
  218. '({)' => 'guy_hug.png',
  219. '(})' => 'girl_hug.png',
  220. ':-[' => 'bat.png',
  221. ':[' => 'bat.png',
  222. '(^)' => 'cake.png',
  223. '(L)' => 'heart.png',
  224. '(l)' => 'heart.png',
  225. '(U)' => 'broken_heart.png',
  226. '(u)' => 'broken_heart.png',
  227. '(K)' => 'kiss.png',
  228. '(k)' => 'kiss.png',
  229. '(G)' => 'present.png',
  230. '(g)' => 'present.png',
  231. '(F)' => 'rose.png',
  232. '(f)' => 'rose.png',
  233. '(W)' => 'wilted_rose.png',
  234. '(w)' => 'wilted_rose.png',
  235. '(p)' => 'camera.png',
  236. '(P)' => 'camera.png',
  237. '(~)' => 'film.png',
  238. '(@)' => 'cat.png',
  239. '(dg)' => 'dog.png',
  240. '(T)' => 'phone.png',
  241. '(t)' => 'phone.png',
  242. '(I)' => 'lightbulb.png',
  243. '(i)' => 'lightbulb.png',
  244. '(8)' => 'note.png',
  245. '(S)' => 'moon.png',
  246. '(*)' => 'star.png',
  247. '(e)' => 'envelope.png',
  248. '(E)' => 'envelope.png',
  249. '(o)' => 'clock.png',
  250. '(O)' => 'clock.png',
  251. '(sn)' => 'scargot.png',
  252. '(pl)' => 'dish.png',
  253. '(||)' => 'bowl.png',
  254. '(pi)' => 'pizza.png',
  255. '(so)' => 'ball.png',
  256. '(au)' => 'car.png',
  257. '(um)' => 'umb.png',
  258. '(ip)' => 'isla.png',
  259. '(co)' => 'pc.png',
  260. '(mp)' => 'cel.png',
  261. '(mo)' => 'money.png',
  262. );
  263.  
  264. foreach($emoticons as $emoticons => $img) {
  265. $analyzedText = str_replace($emoticons, '<img src="'.$C->SITE_URL.'themes/default/imgs/emotics/'.$img.'" height="16" width="16" />', $analyzedText);
  266. }
  267.  
  268. $analyzedText = str_replace('%%%', ':', $analyzedText);
  269.  
  270. return str_replace(PHP_EOL, '<br/>',stripslashes($analyzedText));
  271. }
  272.  
  273. //*************************************************************************
  274.  
  275. function str_cut($str, $mx)
  276. {
  277. return mb_strlen($str)>$mx ? mb_substr($str, 0, $mx-1).'...' : $str;
  278. }
  279.  
  280. //*************************************************************************
  281.  
  282. function getCaptcha()
  283. {
  284. global $C;
  285. $Valor1 = rand(1,9);
  286. $Valor2 = rand(1,9);
  287. $_SESSION['captchasum'] = $Valor1 + $Valor2 ;
  288. $C->ctcha1 = $Valor1;
  289. $C->ctcha2 = $Valor2;
  290. }
  291.  
  292. //*************************************************************************
  293.  
  294. function clearnl($msg)
  295. {
  296. return preg_replace("/(\r?\n){2,}/", "\n\n", $msg);
  297. }
  298.  
  299. //*************************************************************************
  300.  
  301. function send_mail( $from, $to, $subject, $body ) {
  302. $headers = '';
  303. $headers .= "From: $from\n";
  304. $headers .= "Return-Path: $from\n";
  305. $headers .= "MIME-Version: 1.0\n";
  306. $headers .= 'Content-type: text/html; charset=utf-8' . "\r\n";
  307. $headers .= "Date: " . date('r', time()) . "\n";
  308.  
  309.  
  310. mail( $to, $subject , $body, $headers );
  311. }
  312.  
  313.  
  314. function send_mail_phpmailer($target, $subject, $message)
  315. {
  316. require("class.phpmailer.php");
  317. global $C;
  318. $mymail = new PHPMailer();
  319. $mybody = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  320. <html xmlns="http://www.w3.org/1999/xhtml">
  321. <head>
  322. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  323. <title>Email from '.$C->FromName.'</title>
  324. </head><body>';
  325. $mybody .= $message;
  326. $mybody .= '</body></html>';
  327.  
  328. $mymail->From = $C->From;
  329. $mymail->FromName = $C->FromName;
  330. $mymail->Host = $C->Host;
  331. $mymail->Port = $C->Port;
  332. $mymail->Mailer = 'smtp';
  333. $mymail->AddAddress($target);
  334. $mymail->Subject = $subject;
  335. $mymail->Body = $mybody;
  336. $mymail->SMTPAuth = "true";
  337. $mymail->Username = $C->UsernameMail;
  338. $mymail->Password = $C->PasswordMail;
  339.  
  340. $mymail->IsHTML(true);
  341.  
  342. if(!$mymail->Send()) return FALSE;
  343. else return TRUE;
  344. }
  345.  
  346. function genSpaceEmoticons($divspace) {
  347. global $C;
  348.  
  349. // Define smiles
  350. $emoticons = array(
  351. ':-)' => 'regular.png',
  352. ':-D' => 'teeth.png',
  353. ':-O' => 'omg.png',
  354. ':-P' => 'tongue.png',
  355. ';-)' => 'wink.png',
  356. ':((' => 'cry.png',
  357. ':-(' => 'sad.png',
  358. ':-S' => 'confused.png',
  359. ':-|' => 'what.png',
  360. ':-$' => 'red.png',
  361. '(H)' => 'shades.png',
  362. ':-@' => 'angry.png',
  363. '(A)' => 'angel.png',
  364. '(6)' => 'devil.png',
  365. ':-#' => 'dumb.png',
  366. '8o|' => 'growl.png',
  367. '8-|' => 'nerd.png',
  368. '^o)' => 'sarcastic.png',
  369. ':-*' => 'secret.png',
  370. '+o(' => 'sick.png',
  371. ':^)' => 'noknow.png',
  372. '*-)' => 'pensive.png',
  373. '8-)' => 'eyesrolled.png',
  374. '|-)' => 'sleepy.png',
  375. '(C)' => 'coffee.png',
  376. '(Y)' => 'thumbs_up.png',
  377. '(N)' => 'thumbs_down.png',
  378. '(B)' => 'beer_mug.png',
  379. '(D)' => 'martini.png',
  380. '(X)' => 'girl.png',
  381. '(Z)' => 'guy.png',
  382. '({)' => 'guy_hug.png',
  383. '(})' => 'girl_hug.png',
  384. ':-[' => 'bat.png',
  385. '(^)' => 'cake.png',
  386. '(L)' => 'heart.png',
  387. '(U)' => 'broken_heart.png',
  388. '(K)' => 'kiss.png',
  389. '(G)' => 'present.png',
  390. '(F)' => 'rose.png',
  391. '(W)' => 'wilted_rose.png',
  392. '(P)' => 'camera.png',
  393. '(~)' => 'film.png',
  394. '(@)' => 'cat.png',
  395. '(dg)' => 'dog.png',
  396. '(T)' => 'phone.png',
  397. '(I)' => 'lightbulb.png',
  398. '(8)' => 'note.png',
  399. '(S)' => 'moon.png',
  400. '(*)' => 'star.png',
  401. '(E)' => 'envelope.png',
  402. '(O)' => 'clock.png',
  403. '(sn)' => 'scargot.png',
  404. '(pl)' => 'dish.png',
  405. '(||)' => 'bowl.png',
  406. '(pi)' => 'pizza.png',
  407. '(so)' => 'ball.png',
  408. '(au)' => 'car.png',
  409. '(um)' => 'umb.png',
  410. '(ip)' => 'isla.png',
  411. '(co)' => 'pc.png',
  412. '(mp)' => 'cel.png',
  413. '(mo)' => 'money.png',
  414. );
  415.  
  416. $txtEmoticons = '';
  417. foreach($emoticons as $emoticons => $img) {
  418. $txtEmoticons .= '<span class="onesmile"><img onclick="insertEmoticon(\''.$divspace.'\', \''.$emoticons.'\');" class="hand" title="'.$emoticons.'" src="'.$C->SITE_URL.'themes/default/imgs/emotics/'.$img.'" height="16" width="16" /></span>';
  419. }
  420. return $txtEmoticons;
  421. }
  422.  
  423. function analyzeMessageChat($txtmsg) {
  424. global $C;
  425. // Parse any @mentions or links
  426.  
  427. $analyzedText = preg_replace(array('/(?i)\b((?:https?:\/\/|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:\'".,<>?«»“”‘’]))/', '/(^|[^a-z0-9_])@([a-z0-9_]+)/i', '/(^|[^a-z0-9_])#(\w+)/u'), array('<a href="$1" target="_blank" rel="nofollow" class="linkblue">$1</a>', '$1<span class="linkblue3"><a href="'.$C->SITE_URL.'$2">@$2</a></span>', '$1<span class="linkblue3"><a href="'.$C->SITE_URL.'search/t%%%$2">#$2</a></span>'), ($txtmsg));
  428.  
  429.  
  430. // Define smiles
  431. $emoticons = array(
  432. ':-)' => 'regular.png',
  433. ':)' => 'regular.png',
  434. ':-D' => 'teeth.png',
  435. ':d' => 'teeth.png',
  436. ':D' => 'teeth.png',
  437. ':-O' => 'omg.png',
  438. ':o' => 'omg.png',
  439. ':O' => 'omg.png',
  440. ':-P' => 'tongue.png',
  441. ':p' => 'tongue.png',
  442. ':P' => 'tongue.png',
  443. ';-)' => 'wink.png',
  444. ';)' => 'wink.png',
  445. ':((' => 'cry.png',
  446. ':-(' => 'sad.png',
  447. ':(' => 'sad.png',
  448. ':-S' => 'confused.png',
  449. ':s' => 'confused.png',
  450. ':S' => 'confused.png',
  451. ':-|' => 'what.png',
  452. ':|' => 'what.png',
  453. ':-$' => 'red.png',
  454. ':$' => 'red.png',
  455. '(H)' => 'shades.png',
  456. '(h)' => 'shades.png',
  457. ':-@' => 'angry.png',
  458. ':@' => 'angry.png',
  459. '(A)' => 'angel.png',
  460. '(a)' => 'angel.png',
  461. '(6)' => 'devil.png',
  462. ':-#' => 'dumb.png',
  463. '8o|' => 'growl.png',
  464. '8-|' => 'nerd.png',
  465. '^o)' => 'sarcastic.png',
  466. ':-*' => 'secret.png',
  467. '+o(' => 'sick.png',
  468. ':^)' => 'noknow.png',
  469. '*-)' => 'pensive.png',
  470. '8-)' => 'eyesrolled.png',
  471. '|-)' => 'sleepy.png',
  472. '(C)' => 'coffee.png',
  473. '(c)' => 'coffee.png',
  474. '(Y)' => 'thumbs_up.png',
  475. '(y)' => 'thumbs_up.png',
  476. '(n)' => 'thumbs_down.png',
  477. '(N)' => 'thumbs_down.png',
  478. '(B)' => 'beer_mug.png',
  479. '(b)' => 'beer_mug.png',
  480. '(D)' => 'martini.png',
  481. '(d)' => 'martini.png',
  482. '(X)' => 'girl.png',
  483. '(x)' => 'girl.png',
  484. '(Z)' => 'guy.png',
  485. '(z)' => 'guy.png',
  486. '({)' => 'guy_hug.png',
  487. '(})' => 'girl_hug.png',
  488. ':-[' => 'bat.png',
  489. ':[' => 'bat.png',
  490. '(^)' => 'cake.png',
  491. '(L)' => 'heart.png',
  492. '(l)' => 'heart.png',
  493. '(U)' => 'broken_heart.png',
  494. '(u)' => 'broken_heart.png',
  495. '(K)' => 'kiss.png',
  496. '(k)' => 'kiss.png',
  497. '(G)' => 'present.png',
  498. '(g)' => 'present.png',
  499. '(F)' => 'rose.png',
  500. '(f)' => 'rose.png',
  501. '(W)' => 'wilted_rose.png',
  502. '(w)' => 'wilted_rose.png',
  503. '(p)' => 'camera.png',
  504. '(P)' => 'camera.png',
  505. '(~)' => 'film.png',
  506. '(@)' => 'cat.png',
  507. '(dg)' => 'dog.png',
  508. '(T)' => 'phone.png',
  509. '(t)' => 'phone.png',
  510. '(I)' => 'lightbulb.png',
  511. '(i)' => 'lightbulb.png',
  512. '(8)' => 'note.png',
  513. '(S)' => 'moon.png',
  514. '(*)' => 'star.png',
  515. '(e)' => 'envelope.png',
  516. '(E)' => 'envelope.png',
  517. '(o)' => 'clock.png',
  518. '(O)' => 'clock.png',
  519. '(sn)' => 'scargot.png',
  520. '(pl)' => 'dish.png',
  521. '(||)' => 'bowl.png',
  522. '(pi)' => 'pizza.png',
  523. '(so)' => 'ball.png',
  524. '(au)' => 'car.png',
  525. '(um)' => 'umb.png',
  526. '(ip)' => 'isla.png',
  527. '(co)' => 'pc.png',
  528. '(mp)' => 'cel.png',
  529. '(mo)' => 'money.png',
  530. );
  531.  
  532. if ($C->CHAT_WITH_EMOTICONS) {
  533. foreach($emoticons as $emoticons => $img) {
  534. $analyzedText = str_replace($emoticons, '<img src="'.$C->SITE_URL.'themes/default/imgs/emotics/'.$img.'" height="16" width="16" />', $analyzedText);
  535. }
  536. }
  537.  
  538. $analyzedText = str_replace('%%%', ':', $analyzedText);
  539.  
  540. return stripslashes($analyzedText);
  541. }
  542.  
  543. /*************************************/
  544. /*************************************/
  545.  
  546. /*** Update v1.2 ***/
  547.  
  548. function validateUsername($username) {
  549. if (ereg("^[A-Za-z0-9][A-Za-z0-9_]{5,14}$", $username)) return true;
  550. else return false;
  551. }
  552.  
  553. /*** end Update v1.2 ***/
  554.  
  555.  
  556.  
  557.  
  558. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement