DExifII*E`....................................../////.===Shadow-Here===./////................................................ > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < ------------------------------------------------------------------------------------------------------------------- /////////////////////////////////////////////////////////////////////////////////////////////////////////////////// RIFF¤ WEBPVP8 ˜ ðÑ *ôô>‘HŸK¥¤"§£±¨àð enü¹%½_F‘åè¿2ºQú³íªú`N¿­3ÿƒügµJžaÿ¯ÿ°~¼ÎùnúîÞÖô•òíôÁÉß®Sm¥Ü/ ‡ó˜f£Ùà<˜„xëJ¢Ù€SO3x<ªÔ©4¿+ç¶A`q@Ì“Úñè™ÍÿJÌ´ª-˜ÆtÊÛL]Ïq*‘Ý”ì#ŸÌÏãY]@ê`¿ /ªfkØB4·®£ó z—Üw¥Pxù–ÞLШKÇN¾AkÙTf½è'‰g gÆv›Øuh~ a˜Z— ïj*á¥t d£“uÒ ¨`K˜¹ßþ]b>˜]_ÏÔ6W—è2r4x•íÖ…"ƒÖNîä!¦å Ú}ýxGøÌ —@ ;ÆÚŠ=ɾ1ý8lªË¥ô ^yf®Œ¢u&2©nÙÇ›ñÂñŒ³ aPo['½»øFùà­+4ê“$!lövlüÞ=;N®3ð‚õ›DÉKòÞ>ÄÍ ¥ˆuߤ#ˆ$6ù™¥îЇy’ÍB¼ çxÛ;X"WL£R÷͝*ó-¶Zu}º.s¸sšXqù–DþÿvªhüïwyŸ ¯é³lÀ:KCûÄ£Ëá\…­ ~—ýóî ¼ûûÜTÓüÇy…ŽÆvc»¾×U ñ¸žþоP÷¦ó:Ò¨¨5;Ð#&#ÖúñläÿÁœ GxÉ­/ñ‡áQðìYÉtÒw޼GÔ´zàÒò ð*ëzƒ•4~H]Ø‹f ñÓÈñ`NåWçs'ÆÏW^ø¹!XžµmQ5ÃËoLœÎ: ÞËÍ¥J ù…î èo£ßPÎñ¶ž8.Œ]ʵ~5›ÙË-ù*8ÙÖß±~ ©¹rÓê‚j¶d¸{^Q'˜±Crß ÚH—#¥¥QlÀ×ëã‡DÜ«èî þ&Çæžî;ŽÏºò6ÒLÃXy&ZŒ'j‚¢Ù€IßÚù+–MGi‰*jE€‘JcÜ ÓÌ EÏÚj]o˜ Þr <¾U ûŪæÍ/šÝH¥˜b”¼ ÁñßX GP›ï2›4WŠÏà×£…íÓk†¦H·ÅíMh–*nó÷à]ÁjCº€b7<ب‹¨5車bp2:Á[UªM„QŒçiNMa#<5›áËó¸HýÊ"…×Éw¹¦ì2º–x<›»a±¸3Weü®FÝ⑱ö–î–³|LPÈ~çð~Çå‡|º kD¢µÏàÆAI %1À% ¹Ò – ”ϝS¦‰4&¶£°à Öý”û_Ò Áw°A«Å€?mÇÛgHÉ/8)á¾ÛìáöŽP í¨PŸNÙµº¦‡§Ùš"ÿ«>+ªÕ`Ê÷‡‚ß Õû˜þãÇ-PÍ.¾XV‘€ dÜ"þ4¹ ±Oú‘©t¥¦FªÄÃÄ•b‚znýu½—#cDs˜ÃiÑOˆñ×QO=*IAÊ,¶ŽZƒ;‡wøXè%EÐk:F±Ú” .Ѽ+Áu&Ç`."pÈÉw o&¿dE6‘’EqTuK@Ì¥ã™À(Êk(h‰,H}RÀIXÛš3µ1©_OqÚÒJAñ$ÊÙÜ;D3çŒ[þùœh¬Ã³™ö6ç†NY".Ú‰ï[ªŸŒ '²Ð öø_¨ÂÉ9ué¶³ÒŠõTàîMØ#û¯gN‡bÙ놚X„ö …ÉeüÌ^J ‹€.œ$Æ)βÄeæW#óüßĺŸ€ ÀzwV 9oä»f4V*uB «Ë†¹ì¯žR霓æHXa=&“I4K;¯ç‹h×·"UŠ~<•╪Vêª&ÍSÃÆÅ?ÔqÎ*mTM ˜›µwêd#[C¡©§‘D<©àb†–ÁœøvH/,í:¯( ²£|4-„Æövv„Yͼ™^Á$ˆ„¢Û[6yB.åH*V¨æ?$=˜Ñ€•ñ·­(VlŸ‘ nÀt8W÷´Bûba?q9ú¶Xƒl«ÿ\ù¶’þòUÐj/õ¢Ìµ³g$ƒÎR!¸»|Oߍë’BhîÚÑ¢ñåŒJ„®„£2Ð3•ô02Nt…!£Í]Ïc½Qÿ?ˆ<&ÃA¾Ú,JˆijÌ#5yz„‰Î|ÊŽ5QÏ:‹ÐaóVÔxW—CpeÏzÐïíçôÿÅ_[hãsÐ_/ŽTÝ?BîˆííV$<¿i>²F¬_Eß¿ †bÊŒº­ÿ®Z H“C}”¬,Mp ý/Bá£w>˜YV°aƒúh+cŠ- r/[%|üUMHäQ°X»|û/@|°¥Ð !BÔ Ç¢Ä©š+Õì D«7ìN¶ŽðÔ " ƶ’ÖçtA‰Û×}{tþz­¾GÍ›k¹OEJR$ Â׃ «ëÁ"oÉôž$oUK(Ä)Ãz³Ê-‹êN[Ò3Œñbï8P 4ƒ×q¢bo|?<ÛX¬òÄͰL–±›(™ûG?ýË©ÚÄ–ÂDØÐ_Ç¡ô ¾–ÄÏø ×e8Ë©$ÄF¹Å‹ì[©óìl:F¾f´‹‹Xì²ï®\¬ôùƒ ÿat¥óèÒùHß0äe‚;ü×h:ÆWðHž=Ã8骣"kœ'Y?³}Tûè€>?0l›e1Lòñ„aæKÆw…hÖŠùW…ÈÆÄ0ši·›[pcwËþñiêíY/~-Á5˜!¿†A›™Mÿþ(±“t@â“ö2­´TG5yé]çå僳 .·ÍïçÝ7UÚ±Ð/Nè»,_Ï ùdj7\ï Wì4›„»c¸àešg#ÒÊ⥭áØo5‘?ÌdÝô¯ ¹kzsƒ=´#ëÉK›Ø´±-¥eW?‡çßtòTã…$Ý+qÿ±ƒ÷_3Ô¥í÷:æ–ž<·Ö‡‰Å¢ š‡%Ô—utÌÈìðžgÖÀz²À—ï÷Óîäõ{K'´È÷³yaÏÁjƒô}ž§®æÊydÕÈë5¯èˆõvÕ©ã*çD„ “z„Ó‡^^xÂ3M§A´JG‚öï 3W'ˆ.OvXè¡ÊÕª?5º7†˜(˜Ç¶#çê’¶!ÌdZK§æ 0fãaN]òY³RV ™î$®K2R¨`W!1Ôó\;Ý ýB%qæK•&ÓÈe9È0êI±žeŸß -ú@žQr¦ ö4»M¼Áè¹µmw 9 EÆE_°2ó„ŸXKWÁ×Hóì^´²GѝF©óäR†¦‰ç"V»eØ<3ùd3ÿÚ¤Žú“Gi" —‘_ÙËÎ~Üö¯¥½Î»üŸEÚŽåmÞþí ;ÞólËΦMzA"Âf(´òá;Éï(/7½ûñÌ­cïÕçлþÝz¾-ÍvÑ“pH­–ðÓj$¸Äû¤‚‘ãUBË-n“2åPkS5&‹Â|+g^œ®Ì͆d!OïäîU«c;{Û!ÅŽ«ëZ9Ókóˆ]¯ƒ›né `ÇÒ+tÆš (ØKá¾—=3œ®•vuMñg²\ï Ec€ 05±d™‡×iÇ×›UúvÌ¢£Èþ¡ÕØô¶ßÎA"ß±#Ö²ˆÊŸ¦*Ä~ij|àø.-¼'»Ú¥£h ofº¦‡VsR=N½„Î v˜Z*SÌ{=jÑB‹tê…;’HžH¯8–îDù8ñ¢|Q•bÛçš–‹m³“ê¨ åÏ^m¬Žãþ©ïêO‡½6] µÆ„Ooòü ²x}N¦Ë3ïé¿»€›HA˜m%çÞ/¿í7Fø“‹léUk)É°Œµ8Q8›:ÀŠeT*šõ~ôڝG6 ¢}`ùH­–”¡k ‰P1>š†®9z11!X wKfmÁ¦xÑ,N1Q”–æB¶M…ÒÃv6SMˆhU¬ÊPŽï‘öj=·CŒ¯u¹ƒVIЃsx4’ömÛýcå¡¶7ßŠß 57^\wÒÐÆ k§h,Œý î«q^R½3]J¸ÇðN ‚çU¬ôº^Áì} ³f©Õœ§ˆã:FÄÈ‚é(€™?àýÓüè1Gô£¼éj‚OÅñ  #>×—ßtà 0G¥Åa뀐kßhc™À_ÉñÞ#±)GD" YîäË-ÿÙ̪ ¹™a¯´¢E\ÝÒö‚;™„ë]_ p8‰o¡ñ+^÷ 3‘'dT4œŽ ðVë½° :¬víÑ«£tßÚS-3¶“þ2 †üüʨòrš¹M{É_¤`Û¨0ìjœøJ‡:÷ÃáZ˜†@GP&œÑDGÏs¡þ¦þDGú‘1Yá9Ôþ¼ ûø…§÷8&–ÜÑnÄ_m®^üÆ`;ÉVÁJ£?â€-ßê}suÍ2sõA NÌúA磸‘îÿÚ»ƒìö·á¿±tÑÐ"Tÿü˜[@/äj¬€uüªìù¥Ý˜á8Ý´sõj 8@rˆð äþZÇD®ÿUÏ2ùôõrBzÆÏÞž>Ì™xœ“ wiÎ×7_… ¸ \#€MɁV¶¥üÕÿPÔ9Z‡ø§É8#H:ƒ5ÀÝå9ÍIŒ5åKÙŠ÷qÄ>1AÈøžj"µÂд/ªnÀ qªã}"iŸBå˜ÓÛŽ¦…&ݧ;G@—³b¯“•"´4í¨ôM¨åñC‹ïùÉó¯ÓsSH2Ý@ßáM‡ˆKÀªÛUeø/4\gnm¥‹ŸŒ qÄ b9ÞwÒNÏ_4Ég³ú=܆‚´ •â¥õeíþkjz>éÚyU«Íӝ݃6"8/ø{=Ô¢»G¥ äUw°W«,ô—¿ãㆅү¢³xŠUû™yŒ (øSópÐ 9\åTâ»—*oG$/×ÍT†Y¿1¤Þ¢_‡ ¼ „±ÍçèSaÓ 3ÛMÁBkxs‰’R/¡¤ˆÙçª(*õ„üXÌ´ƒ E§´¬EF"Ù”R/ÐNyÆÂ^°?™6¡œïJ·±$§?º>ÖüœcNÌù¯G ‹ñ2ЁBB„^·úìaz¨k:#¨Æ¨8LÎõލ£^§S&cŒÐU€ü(‡F±Š¼&P>8ÙÁ ‰ p5?0ÊÆƒZl¸aô š¼¡}gÿ¶zÆC²¹¬ÎÖG*HB¡O<º2#ñŒAƒ–¡B˜´É$¥›É:FÀÔx¾u?XÜÏÓvN©RS{2ʈãk9rmP¼Qq̳ è¼ÐFׄ^¡Öì fE“F4A…!ì/…¦Lƒ… … $%´¾yã@CI¬ á—3PþBÏNÿ<ý°4Ü ËÃ#ØÍ~âW«rEñw‹eùMMHß²`¬Öó½íf³:‹k˜¯÷}Z!ã¿<¥,\#öµÀ¯aÒNÆIé,Ћ–lŽ#Àæ9ÀÒS·I’½-Ïp Äz¤Š Â* ­íÄ9­< h>׍3ZkËU¹§˜ŒŠ±f­’¤º³Q ÏB?‹#µíÃ¥®@(Gs«†vI¥Mµ‹Á©e~2ú³ÁP4ìÕi‚²Ê^ö@-DþÓàlÜOÍ]n"µã:žpsŽ¢:! Aõ.ç~ÓBûH÷JCÌ]õVƒd «ú´QÙEA–¯¯Œ!.ˆˆëQ±ù œ·Ì!Õâ )ùL„ÅÀlÚè5@B…o´Æ¸XÓ&Û…O«˜”_#‡ƒ„ûÈt!¤ÁÏ›ÎÝŠ?c9 â\>lÓÁVÄÑ™£eØY]:fÝ–—ù+p{™ðè û³”g±OƒÚSù£áÁÊ„ä,ï7š²G ÕÌBk)~ÑiCµ|h#u¤¶îK¨² #²vݯGãeÖ϶ú…¾múÀ¶þÔñ‚Š9'^($¤§ò “š½{éúp÷J›ušS¹áªCÂubÃH9™D™/ZöØÁ‡¦ÝÙŸ·kð*_”.C‹{áXó€‡c¡c€§/šò/&éš÷,àéJþ‰X›fµ“C¨œ®r¬"kL‰Â_q…Z–.ÉL~O µ›zn‚¹À¦Öª7\àHµšÖ %»ÇníV[¥*Õ;ƒ#½¾HK-ÖIÊdÏEÚ#=o÷Óò³´Š: Ç?{¾+9›–‘OEáU·S€˜j"ÄaÜ ŒÛWt› á–c#a»pÔZÞdŽtWê=9éöÊ¢µ~ ë ;Öe‡Œ®:bî3±ýê¢wà¼îpêñ¹¾4 zc¾ðÖÿzdêŒÑÒŝÀ‰s6¤í³ÎÙB¿OZ”+F¤á‡3@Ñëäg©·Ž ˆèª<ù@É{&S„œÕúÀA)‰h:YÀ5^ÂÓŒ°õäU\ ùËÍû#²?Xe¬tu‰^zÒÔãë¼ÛWtEtû …‚g¶Úüâî*moGè¨7%u!]PhÏd™Ý%Îx: VÒ¦ôÊD3ÀŽKÛËãvÆî…N¯ä>Eró–ð`5 Œ%u5XkñÌ*NU%¶áœÊ:Qÿú»“úzyÏ6å-၇¾ ´ ÒÊ]y žO‘w2Äøæ…H’²f±ÎÇ.ª|¥'gîV•Ü .̘¯€šòü¤U~Ù†*¢!?ò wý,}´°ÔÞnïoKq5µb!áÓ3"vAßH¡³¡·G(ÐÎ0Îò¼MG!/ài®@—¬04*`…«é8ªøøló“ˆÊ”èù¤…ßÊoÿé'ËuÌÖ5×È¡§ˆˆfŽë9}hìâ_!!¯  B&Ëö¶‰ÀAÙNVŸ Wh›¸®XÑJì¨ú“¿÷3uj²˜¨ÍÎìë±aúŠÝå¯ð*Ó¨ôJ“yºØ)m°WýOè68†ŸÏ2—‰Ïüꪫٚ¥‹l1 ø ÏÄFjêµvÌbü¦èÝx:X±¢H=MÐß—,ˆÉÇ´(9ú¾^ÅÚ4¿m‡$âX‘å%(AlZo@½¨UOÌÕ”1ø¸jÎÀÃÃ_ µ‘Ü.œº¦Ut: Æï’!=¯uwû#,“pþÇúŒø(é@?³ü¥‘Mo §—s@Œ#)§ŒùkL}NOÆêA›¸~r½¼ÙA—HJ«eˆÖ´*¡ÓpÌŸö.m<-"³ûÈ$¬_6­åf£ïÚâj1y§ÕJ½@dÞÁr&Í\Z%D£Íñ·AZ Û³øüd/ªAi†/Й~  ‡âĮҮÏh§°b—›Û«mJžòG'[ÈYýŒ¦9psl ýÁ ®±f¦x,‰½tN ‚Xª9 ÙÖH.«Lo0×?͹m¡å†Ѽ+›2ƒF ±Ê8 7Hցϓ²Æ–m9…òŸï]Â1äN†VLâCˆU .ÿ‰Ts +ÅÎx(%¦u]6AF Š ØF鈄‘ |¢¶c±soŒ/t[a¾–û:s·`i햍ê›ËchÈ…8ßÀUÜewŒðNOƒõD%q#éû\9¤x¹&UE×G¥ Í—™$ð E6-‡¼!ýpãÔM˜ Âsìe¯ñµK¢Ç¡ùôléœ4Ö£”À Š®Ðc ^¨À}ÙËŸ§›ºê{ÊuÉC ×Sr€¤’fÉ*j!úÓ’Gsùìoîßîn%ò· àc Wp÷$¨˜)û»H ×8ŽÒ€Zj¤3ÀÙºY'Ql¦py{-6íÔCeiØp‘‡XÊîÆUߢ܂ž£Xé¼Y8þ©ëgñß}é.ÎógÒ„ÃØËø¯»™§Xýy M%@NŠ À(~áÐvu7&•,Ù˜ó€uP‡^^®=_E„jt’ 403WebShell
403Webshell
Server IP : 50.6.201.105  /  Your IP : 3.128.31.200
Web Server : Apache
System : Linux vps-13231541.northidigital.com.br 5.14.0-427.31.1.el9_4.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Aug 15 14:47:52 EDT 2024 x86_64
User : novotermaco ( 1059)
PHP Version : 7.4.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /home/novotermaco/public_html/admin/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/novotermaco/public_html/admin/noticiasadd.php
<?php
if (session_id() == "") session_start(); // Initialize Session data
ob_start(); // Turn on output buffering
?>
<?php include_once "ewcfg10.php" ?>
<?php include_once "ewmysql10.php" ?>
<?php include_once "phpfn10.php" ?>
<?php include_once "noticiasinfo.php" ?>
<?php include_once "admininfo.php" ?>
<?php include_once "userfn10.php" ?>
<?php

//
// Page class
//

$noticias_add = NULL; // Initialize page object first

class cnoticias_add extends cnoticias {

	// Page ID
	var $PageID = 'add';

	// Project ID
	var $ProjectID = "{92AF19DC-8210-4443-BC47-09C259AABDEF}";

	// Table name
	var $TableName = 'noticias';

	// Page object name
	var $PageObjName = 'noticias_add';

	// Page name
	function PageName() {
		return ew_CurrentPage();
	}

	// Page URL
	function PageUrl() {
		$PageUrl = ew_CurrentPage() . "?";
		if ($this->UseTokenInUrl) $PageUrl .= "t=" . $this->TableVar . "&"; // Add page token
		return $PageUrl;
	}

	// Message
	function getMessage() {
		return @$_SESSION[EW_SESSION_MESSAGE];
	}

	function setMessage($v) {
		ew_AddMessage($_SESSION[EW_SESSION_MESSAGE], $v);
	}

	function getFailureMessage() {
		return @$_SESSION[EW_SESSION_FAILURE_MESSAGE];
	}

	function setFailureMessage($v) {
		ew_AddMessage($_SESSION[EW_SESSION_FAILURE_MESSAGE], $v);
	}

	function getSuccessMessage() {
		return @$_SESSION[EW_SESSION_SUCCESS_MESSAGE];
	}

	function setSuccessMessage($v) {
		ew_AddMessage($_SESSION[EW_SESSION_SUCCESS_MESSAGE], $v);
	}

	function getWarningMessage() {
		return @$_SESSION[EW_SESSION_WARNING_MESSAGE];
	}

	function setWarningMessage($v) {
		ew_AddMessage($_SESSION[EW_SESSION_WARNING_MESSAGE], $v);
	}

	// Show message
	function ShowMessage() {
		$hidden = FALSE;
		$html = "";

		// Message
		$sMessage = $this->getMessage();
		$this->Message_Showing($sMessage, "");
		if ($sMessage <> "") { // Message in Session, display
			if (!$hidden)
				$sMessage = "<button type=\"button\" class=\"close\" data-dismiss=\"alert\">&times;</button>" . $sMessage;
			$html .= "<div class=\"alert alert-success ewSuccess\">" . $sMessage . "</div>";
			$_SESSION[EW_SESSION_MESSAGE] = ""; // Clear message in Session
		}

		// Warning message
		$sWarningMessage = $this->getWarningMessage();
		$this->Message_Showing($sWarningMessage, "warning");
		if ($sWarningMessage <> "") { // Message in Session, display
			if (!$hidden)
				$sWarningMessage = "<button type=\"button\" class=\"close\" data-dismiss=\"alert\">&times;</button>" . $sWarningMessage;
			$html .= "<div class=\"alert alert-warning ewWarning\">" . $sWarningMessage . "</div>";
			$_SESSION[EW_SESSION_WARNING_MESSAGE] = ""; // Clear message in Session
		}

		// Success message
		$sSuccessMessage = $this->getSuccessMessage();
		$this->Message_Showing($sSuccessMessage, "success");
		if ($sSuccessMessage <> "") { // Message in Session, display
			if (!$hidden)
				$sSuccessMessage = "<button type=\"button\" class=\"close\" data-dismiss=\"alert\">&times;</button>" . $sSuccessMessage;
			$html .= "<div class=\"alert alert-success ewSuccess\">" . $sSuccessMessage . "</div>";
			$_SESSION[EW_SESSION_SUCCESS_MESSAGE] = ""; // Clear message in Session
		}

		// Failure message
		$sErrorMessage = $this->getFailureMessage();
		$this->Message_Showing($sErrorMessage, "failure");
		if ($sErrorMessage <> "") { // Message in Session, display
			if (!$hidden)
				$sErrorMessage = "<button type=\"button\" class=\"close\" data-dismiss=\"alert\">&times;</button>" . $sErrorMessage;
			$html .= "<div class=\"alert alert-error ewError\">" . $sErrorMessage . "</div>";
			$_SESSION[EW_SESSION_FAILURE_MESSAGE] = ""; // Clear message in Session
		}
		echo "<table class=\"ewStdTable\"><tr><td><div class=\"ewMessageDialog\"" . (($hidden) ? " style=\"display: none;\"" : "") . ">" . $html . "</div></td></tr></table>";
	}
	var $PageHeader;
	var $PageFooter;

	// Show Page Header
	function ShowPageHeader() {
		$sHeader = $this->PageHeader;
		$this->Page_DataRendering($sHeader);
		if ($sHeader <> "") { // Header exists, display
			echo "<p>" . $sHeader . "</p>";
		}
	}

	// Show Page Footer
	function ShowPageFooter() {
		$sFooter = $this->PageFooter;
		$this->Page_DataRendered($sFooter);
		if ($sFooter <> "") { // Footer exists, display
			echo "<p>" . $sFooter . "</p>";
		}
	}

	// Validate page request
	function IsPageRequest() {
		global $objForm;
		if ($this->UseTokenInUrl) {
			if ($objForm)
				return ($this->TableVar == $objForm->GetValue("t"));
			if (@$_GET["t"] <> "")
				return ($this->TableVar == $_GET["t"]);
		} else {
			return TRUE;
		}
	}

	//
	// Page class constructor
	//
	function __construct() {
		global $conn, $Language;
		$GLOBALS["Page"] = &$this;

		// Language object
		if (!isset($Language)) $Language = new cLanguage();

		// Parent constuctor
		parent::__construct();

		// Table object (noticias)
		if (!isset($GLOBALS["noticias"]) || get_class($GLOBALS["noticias"]) == "cnoticias") {
			$GLOBALS["noticias"] = &$this;
			$GLOBALS["Table"] = &$GLOBALS["noticias"];
		}

		// Table object (admin)
		if (!isset($GLOBALS['admin'])) $GLOBALS['admin'] = new cadmin();

		// Page ID
		if (!defined("EW_PAGE_ID"))
			define("EW_PAGE_ID", 'add', TRUE);

		// Table name (for backward compatibility)
		if (!defined("EW_TABLE_NAME"))
			define("EW_TABLE_NAME", 'noticias', TRUE);

		// Start timer
		if (!isset($GLOBALS["gTimer"])) $GLOBALS["gTimer"] = new cTimer();

		// Open connection
		if (!isset($conn)) $conn = ew_Connect();
	}

	// 
	//  Page_Init
	//
	function Page_Init() {
		global $gsExport, $gsExportFile, $UserProfile, $Language, $Security, $objForm;

		// Security
		$Security = new cAdvancedSecurity();
		if (!$Security->IsLoggedIn()) $Security->AutoLogin();
		if (!$Security->IsLoggedIn()) {
			$Security->SaveLastUrl();
			$this->Page_Terminate("login.php");
		}

		// Create form object
		$objForm = new cFormObj();
		$this->CurrentAction = (@$_GET["a"] <> "") ? $_GET["a"] : @$_POST["a_list"]; // Set up curent action

		// Global Page Loading event (in userfn*.php)
		Page_Loading();

		// Page Load event
		$this->Page_Load();
	}

	//
	// Page_Terminate
	//
	function Page_Terminate($url = "") {
		global $conn;

		// Page Unload event
		$this->Page_Unload();

		// Global Page Unloaded event (in userfn*.php)
		Page_Unloaded();
		$this->Page_Redirecting($url);

		 // Close connection
		$conn->Close();

		// Go to URL if specified
		if ($url <> "") {
			if (!EW_DEBUG_ENABLED && ob_get_length())
				ob_end_clean();
			header("Location: " . $url);
		}
		exit();
	}
	var $DbMasterFilter = "";
	var $DbDetailFilter = "";
	var $Priv = 0;
	var $OldRecordset;
	var $CopyRecord;

	// 
	// Page main
	//
	function Page_Main() {
		global $objForm, $Language, $gsFormError;

		// Process form if post back
		if (@$_POST["a_add"] <> "") {
			$this->CurrentAction = $_POST["a_add"]; // Get form action
			$this->CopyRecord = $this->LoadOldRecord(); // Load old recordset
			$this->LoadFormValues(); // Load form values
		} else { // Not post back

			// Load key values from QueryString
			$this->CopyRecord = TRUE;
			if (@$_GET["Id"] != "") {
				$this->Id->setQueryStringValue($_GET["Id"]);
				$this->setKey("Id", $this->Id->CurrentValue); // Set up key
			} else {
				$this->setKey("Id", ""); // Clear key
				$this->CopyRecord = FALSE;
			}
			if ($this->CopyRecord) {
				$this->CurrentAction = "C"; // Copy record
			} else {
				$this->CurrentAction = "I"; // Display blank record
				$this->LoadDefaultValues(); // Load default values
			}
		}

		// Set up Breadcrumb
		$this->SetupBreadcrumb();

		// Validate form if post back
		if (@$_POST["a_add"] <> "") {
			if (!$this->ValidateForm()) {
				$this->CurrentAction = "I"; // Form error, reset action
				$this->EventCancelled = TRUE; // Event cancelled
				$this->RestoreFormValues(); // Restore form values
				$this->setFailureMessage($gsFormError);
			}
		}

		// Perform action based on action code
		switch ($this->CurrentAction) {
			case "I": // Blank record, no action required
				break;
			case "C": // Copy an existing record
				if (!$this->LoadRow()) { // Load record based on key
					if ($this->getFailureMessage() == "") $this->setFailureMessage($Language->Phrase("NoRecord")); // No record found
					$this->Page_Terminate("noticiaslist.php"); // No matching record, return to list
				}
				break;
			case "A": // Add new record
				$this->SendEmail = TRUE; // Send email on add success
				if ($this->AddRow($this->OldRecordset)) { // Add successful
					if ($this->getSuccessMessage() == "")
						$this->setSuccessMessage($Language->Phrase("AddSuccess")); // Set up success message
					$sReturnUrl = $this->getReturnUrl();
					if (ew_GetPageName($sReturnUrl) == "noticiasview.php")
						$sReturnUrl = $this->GetViewUrl(); // View paging, return to view page with keyurl directly
					$this->Page_Terminate($sReturnUrl); // Clean up and return
				} else {
					$this->EventCancelled = TRUE; // Event cancelled
					$this->RestoreFormValues(); // Add failed, restore form values
				}
		}

		// Render row based on row type
		$this->RowType = EW_ROWTYPE_ADD;  // Render add type

		// Render row
		$this->ResetAttrs();
		$this->RenderRow();
	}

	// Get upload files
	function GetUploadFiles() {
		global $objForm;

		// Get upload data
		$this->imagem->Upload->Index = $objForm->Index;
		if ($this->imagem->Upload->UploadFile()) {

			// No action required
		} else {
			echo $this->imagem->Upload->Message;
			$this->Page_Terminate();
			exit();
		}
		$this->imagem->CurrentValue = $this->imagem->Upload->FileName;
	}

	// Load default values
	function LoadDefaultValues() {
		$this->local->CurrentValue = "Noticias";
		$this->data->CurrentValue = NULL;
		$this->data->OldValue = $this->data->CurrentValue;
		$this->titulo_portugues->CurrentValue = NULL;
		$this->titulo_portugues->OldValue = $this->titulo_portugues->CurrentValue;
		$this->resumo_portugues->CurrentValue = NULL;
		$this->resumo_portugues->OldValue = $this->resumo_portugues->CurrentValue;
		$this->imagem->Upload->DbValue = NULL;
		$this->imagem->OldValue = $this->imagem->Upload->DbValue;
		$this->imagem->CurrentValue = NULL; // Clear file related field
		$this->texto_portugues->CurrentValue = NULL;
		$this->texto_portugues->OldValue = $this->texto_portugues->CurrentValue;
		$this->exibir->CurrentValue = "Sim";
	}

	// Load form values
	function LoadFormValues() {

		// Load from form
		global $objForm;
		$this->GetUploadFiles(); // Get upload files
		if (!$this->local->FldIsDetailKey) {
			$this->local->setFormValue($objForm->GetValue("x_local"));
		}
		if (!$this->data->FldIsDetailKey) {
			$this->data->setFormValue($objForm->GetValue("x_data"));
			$this->data->CurrentValue = ew_UnFormatDateTime($this->data->CurrentValue, 7);
		}
		if (!$this->titulo_portugues->FldIsDetailKey) {
			$this->titulo_portugues->setFormValue($objForm->GetValue("x_titulo_portugues"));
		}
		if (!$this->resumo_portugues->FldIsDetailKey) {
			$this->resumo_portugues->setFormValue($objForm->GetValue("x_resumo_portugues"));
		}
		if (!$this->texto_portugues->FldIsDetailKey) {
			$this->texto_portugues->setFormValue($objForm->GetValue("x_texto_portugues"));
		}
		if (!$this->exibir->FldIsDetailKey) {
			$this->exibir->setFormValue($objForm->GetValue("x_exibir"));
		}
	}

	// Restore form values
	function RestoreFormValues() {
		global $objForm;
		$this->LoadOldRecord();
		$this->local->CurrentValue = $this->local->FormValue;
		$this->data->CurrentValue = $this->data->FormValue;
		$this->data->CurrentValue = ew_UnFormatDateTime($this->data->CurrentValue, 7);
		$this->titulo_portugues->CurrentValue = $this->titulo_portugues->FormValue;
		$this->resumo_portugues->CurrentValue = $this->resumo_portugues->FormValue;
		$this->texto_portugues->CurrentValue = $this->texto_portugues->FormValue;
		$this->exibir->CurrentValue = $this->exibir->FormValue;
	}

	// Load row based on key values
	function LoadRow() {
		global $conn, $Security, $Language;
		$sFilter = $this->KeyFilter();

		// Call Row Selecting event
		$this->Row_Selecting($sFilter);

		// Load SQL based on filter
		$this->CurrentFilter = $sFilter;
		$sSql = $this->SQL();
		$res = FALSE;
		$rs = ew_LoadRecordset($sSql);
		if ($rs && !$rs->EOF) {
			$res = TRUE;
			$this->LoadRowValues($rs); // Load row values
			$rs->Close();
		}
		return $res;
	}

	// Load row values from recordset
	function LoadRowValues(&$rs) {
		global $conn;
		if (!$rs || $rs->EOF) return;

		// Call Row Selected event
		$row = &$rs->fields;
		$this->Row_Selected($row);
		$this->Id->setDbValue($rs->fields('Id'));
		$this->local->setDbValue($rs->fields('local'));
		$this->data->setDbValue($rs->fields('data'));
		$this->titulo_portugues->setDbValue($rs->fields('titulo_portugues'));
		$this->resumo_portugues->setDbValue($rs->fields('resumo_portugues'));
		$this->imagem->Upload->DbValue = $rs->fields('imagem');
		$this->imagem->CurrentValue = $this->imagem->Upload->DbValue;
		$this->texto_portugues->setDbValue($rs->fields('texto_portugues'));
		$this->exibir->setDbValue($rs->fields('exibir'));
		$this->acessos->setDbValue($rs->fields('acessos'));
	}

	// Load DbValue from recordset
	function LoadDbValues(&$rs) {
		if (!$rs || !is_array($rs) && $rs->EOF) return;
		$row = is_array($rs) ? $rs : $rs->fields;
		$this->Id->DbValue = $row['Id'];
		$this->local->DbValue = $row['local'];
		$this->data->DbValue = $row['data'];
		$this->titulo_portugues->DbValue = $row['titulo_portugues'];
		$this->resumo_portugues->DbValue = $row['resumo_portugues'];
		$this->imagem->Upload->DbValue = $row['imagem'];
		$this->texto_portugues->DbValue = $row['texto_portugues'];
		$this->exibir->DbValue = $row['exibir'];
		$this->acessos->DbValue = $row['acessos'];
	}

	// Load old record
	function LoadOldRecord() {

		// Load key values from Session
		$bValidKey = TRUE;
		if (strval($this->getKey("Id")) <> "")
			$this->Id->CurrentValue = $this->getKey("Id"); // Id
		else
			$bValidKey = FALSE;

		// Load old recordset
		if ($bValidKey) {
			$this->CurrentFilter = $this->KeyFilter();
			$sSql = $this->SQL();
			$this->OldRecordset = ew_LoadRecordset($sSql);
			$this->LoadRowValues($this->OldRecordset); // Load row values
		} else {
			$this->OldRecordset = NULL;
		}
		return $bValidKey;
	}

	// Render row values based on field settings
	function RenderRow() {
		global $conn, $Security, $Language;
		global $gsLanguage;

		// Initialize URLs
		// Call Row_Rendering event

		$this->Row_Rendering();

		// Common render codes for all row types
		// Id
		// local
		// data
		// titulo_portugues
		// resumo_portugues
		// imagem
		// texto_portugues
		// exibir
		// acessos

		if ($this->RowType == EW_ROWTYPE_VIEW) { // View row

			// Id
			$this->Id->ViewValue = $this->Id->CurrentValue;
			$this->Id->ViewCustomAttributes = "";

			// local
			if (strval($this->local->CurrentValue) <> "") {
				switch ($this->local->CurrentValue) {
					case $this->local->FldTagValue(1):
						$this->local->ViewValue = $this->local->FldTagCaption(1) <> "" ? $this->local->FldTagCaption(1) : $this->local->CurrentValue;
						break;
					case $this->local->FldTagValue(2):
						$this->local->ViewValue = $this->local->FldTagCaption(2) <> "" ? $this->local->FldTagCaption(2) : $this->local->CurrentValue;
						break;
					default:
						$this->local->ViewValue = $this->local->CurrentValue;
				}
			} else {
				$this->local->ViewValue = NULL;
			}
			$this->local->ViewCustomAttributes = "";

			// data
			$this->data->ViewValue = $this->data->CurrentValue;
			$this->data->ViewValue = ew_FormatDateTime($this->data->ViewValue, 7);
			$this->data->ViewCustomAttributes = "";

			// titulo_portugues
			$this->titulo_portugues->ViewValue = $this->titulo_portugues->CurrentValue;
			$this->titulo_portugues->ViewCustomAttributes = "";

			// resumo_portugues
			$this->resumo_portugues->ViewValue = $this->resumo_portugues->CurrentValue;
			$this->resumo_portugues->ViewCustomAttributes = "";

			// imagem
			$this->imagem->UploadPath = "../images/noticias/";
			if (!ew_Empty($this->imagem->Upload->DbValue)) {
				$this->imagem->ImageAlt = $this->imagem->FldAlt();
				$this->imagem->ViewValue = ew_UploadPathEx(FALSE, $this->imagem->UploadPath) . $this->imagem->Upload->DbValue;
			} else {
				$this->imagem->ViewValue = "";
			}
			$this->imagem->ViewCustomAttributes = "";

			// texto_portugues
			$this->texto_portugues->ViewValue = $this->texto_portugues->CurrentValue;
			$this->texto_portugues->ViewCustomAttributes = "";

			// exibir
			if (strval($this->exibir->CurrentValue) <> "") {
				switch ($this->exibir->CurrentValue) {
					case $this->exibir->FldTagValue(1):
						$this->exibir->ViewValue = $this->exibir->FldTagCaption(1) <> "" ? $this->exibir->FldTagCaption(1) : $this->exibir->CurrentValue;
						break;
					case $this->exibir->FldTagValue(2):
						$this->exibir->ViewValue = $this->exibir->FldTagCaption(2) <> "" ? $this->exibir->FldTagCaption(2) : $this->exibir->CurrentValue;
						break;
					default:
						$this->exibir->ViewValue = $this->exibir->CurrentValue;
				}
			} else {
				$this->exibir->ViewValue = NULL;
			}
			$this->exibir->ViewCustomAttributes = "";

			// acessos
			$this->acessos->ViewValue = $this->acessos->CurrentValue;
			$this->acessos->ViewCustomAttributes = "";

			// local
			$this->local->LinkCustomAttributes = "";
			$this->local->HrefValue = "";
			$this->local->TooltipValue = "";

			// data
			$this->data->LinkCustomAttributes = "";
			$this->data->HrefValue = "";
			$this->data->TooltipValue = "";

			// titulo_portugues
			$this->titulo_portugues->LinkCustomAttributes = "";
			$this->titulo_portugues->HrefValue = "";
			$this->titulo_portugues->TooltipValue = "";

			// resumo_portugues
			$this->resumo_portugues->LinkCustomAttributes = "";
			$this->resumo_portugues->HrefValue = "";
			$this->resumo_portugues->TooltipValue = "";

			// imagem
			$this->imagem->LinkCustomAttributes = "";
			$this->imagem->HrefValue = "";
			$this->imagem->HrefValue2 = $this->imagem->UploadPath . $this->imagem->Upload->DbValue;
			$this->imagem->TooltipValue = "";

			// texto_portugues
			$this->texto_portugues->LinkCustomAttributes = "";
			$this->texto_portugues->HrefValue = "";
			$this->texto_portugues->TooltipValue = "";

			// exibir
			$this->exibir->LinkCustomAttributes = "";
			$this->exibir->HrefValue = "";
			$this->exibir->TooltipValue = "";
		} elseif ($this->RowType == EW_ROWTYPE_ADD) { // Add row

			// local
			$this->local->EditCustomAttributes = "";
			$arwrk = array();
			$arwrk[] = array($this->local->FldTagValue(1), $this->local->FldTagCaption(1) <> "" ? $this->local->FldTagCaption(1) : $this->local->FldTagValue(1));
			$arwrk[] = array($this->local->FldTagValue(2), $this->local->FldTagCaption(2) <> "" ? $this->local->FldTagCaption(2) : $this->local->FldTagValue(2));
			array_unshift($arwrk, array("", $Language->Phrase("PleaseSelect")));
			$this->local->EditValue = $arwrk;

			// data
			$this->data->EditCustomAttributes = "";
			$this->data->EditValue = ew_HtmlEncode(ew_FormatDateTime($this->data->CurrentValue, 7));
			$this->data->PlaceHolder = ew_HtmlEncode(ew_RemoveHtml($this->data->FldCaption()));

			// titulo_portugues
			$this->titulo_portugues->EditCustomAttributes = "";
			$this->titulo_portugues->EditValue = ew_HtmlEncode($this->titulo_portugues->CurrentValue);
			$this->titulo_portugues->PlaceHolder = ew_HtmlEncode(ew_RemoveHtml($this->titulo_portugues->FldCaption()));

			// resumo_portugues
			$this->resumo_portugues->EditCustomAttributes = "";
			$this->resumo_portugues->EditValue = $this->resumo_portugues->CurrentValue;
			$this->resumo_portugues->PlaceHolder = ew_HtmlEncode(ew_RemoveHtml($this->resumo_portugues->FldCaption()));

			// imagem
			$this->imagem->EditCustomAttributes = "";
			$this->imagem->UploadPath = "../images/noticias/";
			if (!ew_Empty($this->imagem->Upload->DbValue)) {
				$this->imagem->ImageAlt = $this->imagem->FldAlt();
				$this->imagem->EditValue = ew_UploadPathEx(FALSE, $this->imagem->UploadPath) . $this->imagem->Upload->DbValue;
			} else {
				$this->imagem->EditValue = "";
			}
			if (!ew_Empty($this->imagem->CurrentValue))
				$this->imagem->Upload->FileName = $this->imagem->CurrentValue;
			if (($this->CurrentAction == "I" || $this->CurrentAction == "C") && !$this->EventCancelled) ew_RenderUploadField($this->imagem);

			// texto_portugues
			$this->texto_portugues->EditCustomAttributes = "";
			$this->texto_portugues->EditValue = $this->texto_portugues->CurrentValue;
			$this->texto_portugues->PlaceHolder = ew_HtmlEncode(ew_RemoveHtml($this->texto_portugues->FldCaption()));

			// exibir
			$this->exibir->EditCustomAttributes = "";
			$arwrk = array();
			$arwrk[] = array($this->exibir->FldTagValue(1), $this->exibir->FldTagCaption(1) <> "" ? $this->exibir->FldTagCaption(1) : $this->exibir->FldTagValue(1));
			$arwrk[] = array($this->exibir->FldTagValue(2), $this->exibir->FldTagCaption(2) <> "" ? $this->exibir->FldTagCaption(2) : $this->exibir->FldTagValue(2));
			$this->exibir->EditValue = $arwrk;

			// Edit refer script
			// local

			$this->local->HrefValue = "";

			// data
			$this->data->HrefValue = "";

			// titulo_portugues
			$this->titulo_portugues->HrefValue = "";

			// resumo_portugues
			$this->resumo_portugues->HrefValue = "";

			// imagem
			$this->imagem->HrefValue = "";
			$this->imagem->HrefValue2 = $this->imagem->UploadPath . $this->imagem->Upload->DbValue;

			// texto_portugues
			$this->texto_portugues->HrefValue = "";

			// exibir
			$this->exibir->HrefValue = "";
		}
		if ($this->RowType == EW_ROWTYPE_ADD ||
			$this->RowType == EW_ROWTYPE_EDIT ||
			$this->RowType == EW_ROWTYPE_SEARCH) { // Add / Edit / Search row
			$this->SetupFieldTitles();
		}

		// Call Row Rendered event
		if ($this->RowType <> EW_ROWTYPE_AGGREGATEINIT)
			$this->Row_Rendered();
	}

	// Validate form
	function ValidateForm() {
		global $Language, $gsFormError;

		// Initialize form error message
		$gsFormError = "";

		// Check if validation required
		if (!EW_SERVER_VALIDATE)
			return ($gsFormError == "");
		if (!$this->data->FldIsDetailKey && !is_null($this->data->FormValue) && $this->data->FormValue == "") {
			ew_AddMessage($gsFormError, $Language->Phrase("EnterRequiredField") . " - " . $this->data->FldCaption());
		}
		if (!ew_CheckEuroDate($this->data->FormValue)) {
			ew_AddMessage($gsFormError, $this->data->FldErrMsg());
		}
		if (!$this->titulo_portugues->FldIsDetailKey && !is_null($this->titulo_portugues->FormValue) && $this->titulo_portugues->FormValue == "") {
			ew_AddMessage($gsFormError, $Language->Phrase("EnterRequiredField") . " - " . $this->titulo_portugues->FldCaption());
		}
		if ($this->exibir->FormValue == "") {
			ew_AddMessage($gsFormError, $Language->Phrase("EnterRequiredField") . " - " . $this->exibir->FldCaption());
		}

		// Return validate result
		$ValidateForm = ($gsFormError == "");

		// Call Form_CustomValidate event
		$sFormCustomError = "";
		$ValidateForm = $ValidateForm && $this->Form_CustomValidate($sFormCustomError);
		if ($sFormCustomError <> "") {
			ew_AddMessage($gsFormError, $sFormCustomError);
		}
		return $ValidateForm;
	}

	// Add record
	function AddRow($rsold = NULL) {
		global $conn, $Language, $Security;

		// Load db values from rsold
		if ($rsold) {
			$this->LoadDbValues($rsold);
			$this->imagem->OldUploadPath = "../images/noticias/";
			$this->imagem->UploadPath = $this->imagem->OldUploadPath;
		}
		$rsnew = array();

		// local
		$this->local->SetDbValueDef($rsnew, $this->local->CurrentValue, NULL, strval($this->local->CurrentValue) == "");

		// data
		$this->data->SetDbValueDef($rsnew, ew_UnFormatDateTime($this->data->CurrentValue, 7), NULL, FALSE);

		// titulo_portugues
		$this->titulo_portugues->SetDbValueDef($rsnew, $this->titulo_portugues->CurrentValue, NULL, FALSE);

		// resumo_portugues
		$this->resumo_portugues->SetDbValueDef($rsnew, $this->resumo_portugues->CurrentValue, NULL, FALSE);

		// imagem
		if (!$this->imagem->Upload->KeepFile) {
			if ($this->imagem->Upload->FileName == "") {
				$rsnew['imagem'] = NULL;
			} else {
				$rsnew['imagem'] = $this->imagem->Upload->FileName;
			}
		}

		// texto_portugues
		$this->texto_portugues->SetDbValueDef($rsnew, $this->texto_portugues->CurrentValue, NULL, FALSE);

		// exibir
		$this->exibir->SetDbValueDef($rsnew, $this->exibir->CurrentValue, NULL, strval($this->exibir->CurrentValue) == "");
		if (!$this->imagem->Upload->KeepFile) {
			$this->imagem->UploadPath = "../images/noticias/";
			if (!ew_Empty($this->imagem->Upload->Value)) {
				$rsnew['imagem'] = ew_UploadFileNameEx(ew_UploadPathEx(TRUE, $this->imagem->UploadPath), $rsnew['imagem']); // Get new file name
			}
		}

		// Call Row Inserting event
		$rs = ($rsold == NULL) ? NULL : $rsold->fields;
		$bInsertRow = $this->Row_Inserting($rs, $rsnew);
		if ($bInsertRow) {
			$conn->raiseErrorFn = 'ew_ErrorFn';
			$AddRow = $this->Insert($rsnew);
			$conn->raiseErrorFn = '';
			if ($AddRow) {
				if (!$this->imagem->Upload->KeepFile) {
					if (!ew_Empty($this->imagem->Upload->Value)) {
						$this->imagem->Upload->SaveToFile($this->imagem->UploadPath, $rsnew['imagem'], TRUE);
					}
				}
			}
		} else {
			if ($this->getSuccessMessage() <> "" || $this->getFailureMessage() <> "") {

				// Use the message, do nothing
			} elseif ($this->CancelMessage <> "") {
				$this->setFailureMessage($this->CancelMessage);
				$this->CancelMessage = "";
			} else {
				$this->setFailureMessage($Language->Phrase("InsertCancelled"));
			}
			$AddRow = FALSE;
		}

		// Get insert id if necessary
		if ($AddRow) {
			$this->Id->setDbValue($conn->Insert_ID());
			$rsnew['Id'] = $this->Id->DbValue;
		}
		if ($AddRow) {

			// Call Row Inserted event
			$rs = ($rsold == NULL) ? NULL : $rsold->fields;
			$this->Row_Inserted($rs, $rsnew);
		}

		// imagem
		ew_CleanUploadTempPath($this->imagem, $this->imagem->Upload->Index);
		return $AddRow;
	}

	// Set up Breadcrumb
	function SetupBreadcrumb() {
		global $Breadcrumb, $Language;
		$Breadcrumb = new cBreadcrumb();
		$Breadcrumb->Add("list", $this->TableVar, "noticiaslist.php", $this->TableVar, TRUE);
		$PageId = ($this->CurrentAction == "C") ? "Copy" : "Add";
		$Breadcrumb->Add("add", $PageId, ew_CurrentUrl());
	}

	// Page Load event
	function Page_Load() {

		//echo "Page Load";
	}

	// Page Unload event
	function Page_Unload() {

		//echo "Page Unload";
	}

	// Page Redirecting event
	function Page_Redirecting(&$url) {

		// Example:
		//$url = "your URL";

	}

	// Message Showing event
	// $type = ''|'success'|'failure'|'warning'
	function Message_Showing(&$msg, $type) {
		if ($type == 'success') {

			//$msg = "your success message";
		} elseif ($type == 'failure') {

			//$msg = "your failure message";
		} elseif ($type == 'warning') {

			//$msg = "your warning message";
		} else {

			//$msg = "your message";
		}
	}

	// Page Render event
	function Page_Render() {

		//echo "Page Render";
	}

	// Page Data Rendering event
	function Page_DataRendering(&$header) {

		// Example:
		//$header = "your header";

	}

	// Page Data Rendered event
	function Page_DataRendered(&$footer) {

		// Example:
		//$footer = "your footer";

	}

	// Form Custom Validate event
	function Form_CustomValidate(&$CustomError) {

		// Return error message in CustomError
		return TRUE;
	}
}
?>
<?php ew_Header(FALSE) ?>
<?php

// Create page object
if (!isset($noticias_add)) $noticias_add = new cnoticias_add();

// Page init
$noticias_add->Page_Init();

// Page main
$noticias_add->Page_Main();

// Global Page Rendering event (in userfn*.php)
Page_Rendering();

// Page Rendering event
$noticias_add->Page_Render();
?>
<?php include_once "header.php" ?>
<script type="text/javascript">

// Page object
var noticias_add = new ew_Page("noticias_add");
noticias_add.PageID = "add"; // Page ID
var EW_PAGE_ID = noticias_add.PageID; // For backward compatibility

// Form object
var fnoticiasadd = new ew_Form("fnoticiasadd");

// Validate form
fnoticiasadd.Validate = function() {
	if (!this.ValidateRequired)
		return true; // Ignore validation
	var $ = jQuery, fobj = this.GetForm(), $fobj = $(fobj);
	this.PostAutoSuggest();
	if ($fobj.find("#a_confirm").val() == "F")
		return true;
	var elm, felm, uelm, addcnt = 0;
	var $k = $fobj.find("#" + this.FormKeyCountName); // Get key_count
	var rowcnt = ($k[0]) ? parseInt($k.val(), 10) : 1;
	var startcnt = (rowcnt == 0) ? 0 : 1; // Check rowcnt == 0 => Inline-Add
	var gridinsert = $fobj.find("#a_list").val() == "gridinsert";
	for (var i = startcnt; i <= rowcnt; i++) {
		var infix = ($k[0]) ? String(i) : "";
		$fobj.data("rowindex", infix);
			elm = this.GetElements("x" + infix + "_data");
			if (elm && !ew_HasValue(elm))
				return this.OnError(elm, ewLanguage.Phrase("EnterRequiredField") + " - <?php echo ew_JsEncode2($noticias->data->FldCaption()) ?>");
			elm = this.GetElements("x" + infix + "_data");
			if (elm && !ew_CheckEuroDate(elm.value))
				return this.OnError(elm, "<?php echo ew_JsEncode2($noticias->data->FldErrMsg()) ?>");
			elm = this.GetElements("x" + infix + "_titulo_portugues");
			if (elm && !ew_HasValue(elm))
				return this.OnError(elm, ewLanguage.Phrase("EnterRequiredField") + " - <?php echo ew_JsEncode2($noticias->titulo_portugues->FldCaption()) ?>");
			elm = this.GetElements("x" + infix + "_exibir");
			if (elm && !ew_HasValue(elm))
				return this.OnError(elm, ewLanguage.Phrase("EnterRequiredField") + " - <?php echo ew_JsEncode2($noticias->exibir->FldCaption()) ?>");

			// Set up row object
			ew_ElementsToRow(fobj);

			// Fire Form_CustomValidate event
			if (!this.Form_CustomValidate(fobj))
				return false;
	}

	// Process detail forms
	var dfs = $fobj.find("input[name='detailpage']").get();
	for (var i = 0; i < dfs.length; i++) {
		var df = dfs[i], val = df.value;
		if (val && ewForms[val])
			if (!ewForms[val].Validate())
				return false;
	}
	return true;
}

// Form_CustomValidate event
fnoticiasadd.Form_CustomValidate = 
 function(fobj) { // DO NOT CHANGE THIS LINE!

 	// Your custom validation code here, return false if invalid. 
 	return true;
 }

// Use JavaScript validation or not
<?php if (EW_CLIENT_VALIDATE) { ?>
fnoticiasadd.ValidateRequired = true;
<?php } else { ?>
fnoticiasadd.ValidateRequired = false; 
<?php } ?>

// Dynamic selection lists
// Form object for search

</script>
<script type="text/javascript">

// Write your client script here, no need to add script tags.
</script>
<?php $Breadcrumb->Render(); ?>
<?php $noticias_add->ShowPageHeader(); ?>
<?php
$noticias_add->ShowMessage();
?>
<form name="fnoticiasadd" id="fnoticiasadd" class="ewForm form-horizontal" action="<?php echo ew_CurrentPage() ?>" method="post">
<input type="hidden" name="t" value="noticias">
<input type="hidden" name="a_add" id="a_add" value="A">
<table class="ewGrid"><tr><td>
<table id="tbl_noticiasadd" class="table table-bordered table-striped">
<?php if ($noticias->local->Visible) { // local ?>
	<tr id="r_local">
		<td><span id="elh_noticias_local"><?php echo $noticias->local->FldCaption() ?></span></td>
		<td<?php echo $noticias->local->CellAttributes() ?>>
<span id="el_noticias_local" class="control-group">
<select data-field="x_local" id="x_local" name="x_local"<?php echo $noticias->local->EditAttributes() ?>>
<?php
if (is_array($noticias->local->EditValue)) {
	$arwrk = $noticias->local->EditValue;
	$rowswrk = count($arwrk);
	$emptywrk = TRUE;
	for ($rowcntwrk = 0; $rowcntwrk < $rowswrk; $rowcntwrk++) {
		$selwrk = (strval($noticias->local->CurrentValue) == strval($arwrk[$rowcntwrk][0])) ? " selected=\"selected\"" : "";
		if ($selwrk <> "") $emptywrk = FALSE;
?>
<option value="<?php echo ew_HtmlEncode($arwrk[$rowcntwrk][0]) ?>"<?php echo $selwrk ?>>
<?php echo $arwrk[$rowcntwrk][1] ?>
</option>
<?php
	}
}
?>
</select>
</span>
<?php echo $noticias->local->CustomMsg ?></td>
	</tr>
<?php } ?>
<?php if ($noticias->data->Visible) { // data ?>
	<tr id="r_data">
		<td><span id="elh_noticias_data"><?php echo $noticias->data->FldCaption() ?><?php echo $Language->Phrase("FieldRequiredIndicator") ?></span></td>
		<td<?php echo $noticias->data->CellAttributes() ?>>
<span id="el_noticias_data" class="control-group">
<input type="text" data-field="x_data" name="x_data" id="x_data" size="10" maxlength="10" placeholder="<?php echo $noticias->data->PlaceHolder ?>" value="<?php echo $noticias->data->EditValue ?>"<?php echo $noticias->data->EditAttributes() ?>>
<?php if (!$noticias->data->ReadOnly && !$noticias->data->Disabled && @$noticias->data->EditAttrs["readonly"] == "" && @$noticias->data->EditAttrs["disabled"] == "") { ?>
<button id="cal_x_data" name="cal_x_data" class="btn" type="button"><img src="phpimages/calendar.png" alt="<?php echo $Language->Phrase("PickDate") ?>" title="<?php echo $Language->Phrase("PickDate") ?>" style="border: 0;"></button><script type="text/javascript">
ew_CreateCalendar("fnoticiasadd", "x_data", "%d/%m/%Y");
</script>
<?php } ?>
</span>
<?php echo $noticias->data->CustomMsg ?></td>
	</tr>
<?php } ?>
<?php if ($noticias->titulo_portugues->Visible) { // titulo_portugues ?>
	<tr id="r_titulo_portugues">
		<td><span id="elh_noticias_titulo_portugues"><?php echo $noticias->titulo_portugues->FldCaption() ?><?php echo $Language->Phrase("FieldRequiredIndicator") ?></span></td>
		<td<?php echo $noticias->titulo_portugues->CellAttributes() ?>>
<span id="el_noticias_titulo_portugues" class="control-group">
<input type="text" data-field="x_titulo_portugues" name="x_titulo_portugues" id="x_titulo_portugues" size="80" maxlength="255" placeholder="<?php echo $noticias->titulo_portugues->PlaceHolder ?>" value="<?php echo $noticias->titulo_portugues->EditValue ?>"<?php echo $noticias->titulo_portugues->EditAttributes() ?>>
</span>
<?php echo $noticias->titulo_portugues->CustomMsg ?></td>
	</tr>
<?php } ?>
<?php if ($noticias->resumo_portugues->Visible) { // resumo_portugues ?>
	<tr id="r_resumo_portugues">
		<td><span id="elh_noticias_resumo_portugues"><?php echo $noticias->resumo_portugues->FldCaption() ?></span></td>
		<td<?php echo $noticias->resumo_portugues->CellAttributes() ?>>
<span id="el_noticias_resumo_portugues" class="control-group">
<textarea data-field="x_resumo_portugues" name="x_resumo_portugues" id="x_resumo_portugues" cols="100" rows="4" placeholder="<?php echo $noticias->resumo_portugues->PlaceHolder ?>"<?php echo $noticias->resumo_portugues->EditAttributes() ?>><?php echo $noticias->resumo_portugues->EditValue ?></textarea>
</span>
<?php echo $noticias->resumo_portugues->CustomMsg ?></td>
	</tr>
<?php } ?>
<?php if ($noticias->imagem->Visible) { // imagem ?>
	<tr id="r_imagem">
		<td><span id="elh_noticias_imagem"><?php echo $noticias->imagem->FldCaption() ?></span></td>
		<td<?php echo $noticias->imagem->CellAttributes() ?>>
<div id="el_noticias_imagem" class="control-group">
<span id="fd_x_imagem">
<span class="btn btn-small fileinput-button"<?php if ($noticias->imagem->ReadOnly || $noticias->imagem->Disabled) echo " style=\"display: none;\""; ?>>
	<span><?php echo $Language->Phrase("ChooseFile") ?></span>
	<input type="file" data-field="x_imagem" name="x_imagem" id="x_imagem">
</span>
<input type="hidden" name="fn_x_imagem" id= "fn_x_imagem" value="<?php echo $noticias->imagem->Upload->FileName ?>">
<input type="hidden" name="fa_x_imagem" id= "fa_x_imagem" value="0">
<input type="hidden" name="fs_x_imagem" id= "fs_x_imagem" value="255">
</span>
<table id="ft_x_imagem" class="table table-condensed pull-left ewUploadTable"><tbody class="files"></tbody></table>
</div>
<?php echo $noticias->imagem->CustomMsg ?></td>
	</tr>
<?php } ?>
<?php if ($noticias->texto_portugues->Visible) { // texto_portugues ?>
	<tr id="r_texto_portugues">
		<td><span id="elh_noticias_texto_portugues"><?php echo $noticias->texto_portugues->FldCaption() ?></span></td>
		<td<?php echo $noticias->texto_portugues->CellAttributes() ?>>
<span id="el_noticias_texto_portugues" class="control-group">
<textarea data-field="x_texto_portugues" class="editor" name="x_texto_portugues" id="x_texto_portugues" cols="45" rows="12" placeholder="<?php echo $noticias->texto_portugues->PlaceHolder ?>"<?php echo $noticias->texto_portugues->EditAttributes() ?>><?php echo $noticias->texto_portugues->EditValue ?></textarea>
<script type="text/javascript">
ew_CreateEditor("fnoticiasadd", "x_texto_portugues", 45, 12, <?php echo ($noticias->texto_portugues->ReadOnly || FALSE) ? "true" : "false" ?>);
</script>
</span>
<?php echo $noticias->texto_portugues->CustomMsg ?></td>
	</tr>
<?php } ?>
<?php if ($noticias->exibir->Visible) { // exibir ?>
	<tr id="r_exibir">
		<td><span id="elh_noticias_exibir"><?php echo $noticias->exibir->FldCaption() ?><?php echo $Language->Phrase("FieldRequiredIndicator") ?></span></td>
		<td<?php echo $noticias->exibir->CellAttributes() ?>>
<span id="el_noticias_exibir" class="control-group">
<div id="tp_x_exibir" class="<?php echo EW_ITEM_TEMPLATE_CLASSNAME ?>"><input type="radio" name="x_exibir" id="x_exibir" value="{value}"<?php echo $noticias->exibir->EditAttributes() ?>></div>
<div id="dsl_x_exibir" data-repeatcolumn="5" class="ewItemList">
<?php
$arwrk = $noticias->exibir->EditValue;
if (is_array($arwrk)) {
	$rowswrk = count($arwrk);
	$emptywrk = TRUE;
	for ($rowcntwrk = 0; $rowcntwrk < $rowswrk; $rowcntwrk++) {
		$selwrk = (strval($noticias->exibir->CurrentValue) == strval($arwrk[$rowcntwrk][0])) ? " checked=\"checked\"" : "";
		if ($selwrk <> "") $emptywrk = FALSE;

		// Note: No spacing within the LABEL tag
?>
<?php echo ew_RepeatColumnTable($rowswrk, $rowcntwrk, 5, 1) ?>
<label class="radio"><input type="radio" data-field="x_exibir" name="x_exibir" id="x_exibir_<?php echo $rowcntwrk ?>" value="<?php echo ew_HtmlEncode($arwrk[$rowcntwrk][0]) ?>"<?php echo $selwrk ?><?php echo $noticias->exibir->EditAttributes() ?>><?php echo $arwrk[$rowcntwrk][1] ?></label>
<?php echo ew_RepeatColumnTable($rowswrk, $rowcntwrk, 5, 2) ?>
<?php
	}
}
?>
</div>
</span>
<?php echo $noticias->exibir->CustomMsg ?></td>
	</tr>
<?php } ?>
</table>
</td></tr></table>
<button class="btn btn-primary ewButton" name="btnAction" id="btnAction" type="submit"><?php echo $Language->Phrase("AddBtn") ?></button>
</form>
<script type="text/javascript">
fnoticiasadd.Init();
<?php if (EW_MOBILE_REFLOW && ew_IsMobile()) { ?>
ew_Reflow();
<?php } ?>
</script>
<?php
$noticias_add->ShowPageFooter();
if (EW_DEBUG_ENABLED)
	echo ew_DebugMsg();
?>
<script type="text/javascript">

// Write your table-specific startup script here
// document.write("page loaded");

</script>
<?php include_once "footer.php" ?>
<?php
$noticias_add->Page_Terminate();
?>

Youez - 2016 - github.com/yon3zu
LinuXploit