Example #1
1
function makeTask(&$frm)
{
    global $session;
    /* frist feld formatieren */
    $frist = "0000-00-00";
    if (isset($frm['frist']) && $frm['frist'] != "JJJJ-MM-TT") {
        $frist = $frm['frist'];
    }
    // Überprüfung ob Task mit Language schon vorhanden
    /////////////
    // neuen Text anlegen
    $ntextid = sql_addNewText(sqlv($frm['title']), sqlv(nvl($frm['abstract'])), 0, $frm['lang'], nvl($frm['cat'], 0), nvl($frm['filetyp'], 0), $session['userid'], $frm['textID']);
    if (!isset($ntextid) or $ntextid == 0) {
        $session['notice'] = "error making Task. Cannot generate new Text! Please contact the administrator via contact-link<br>Errorcode: tid={$frm['textID']}";
        return 0;
    }
    // neuen Task anlegen
    $taskID = sql_addNewTask($frm['textID'], $ntextid, $session['userid'], $frist);
    return 1;
}
Example #2
0
 public function numProductos()
 {
     $num = 0;
     for ($p = 0; $p < $this->nf; $p++) {
         if (nvl($this->carro['estado'][$p])) {
             $num++;
         }
     }
     return $num;
 }
 static function democonsent($params)
 {
     $server = $params['cortodata']['server'];
     if ($params['cortofirstcall']) {
         $response = $params['cortodata']['response'];
         $attributes = attributes2array($response['saml:Assertion']['saml:AttributeStatement'][0]['saml:Attribute']);
         print $server->renderTemplate('consent', array('action' => $params['cortolocation'], 'attributes' => $attributes, 'cortopassthru' => $params['cortopassthru'], 'cortoentityid' => $params['cortoentityid'], 'cortoservice' => $params['cortoservice']));
         exit;
     }
     if (nvl($_POST, 'consent') !== 'yes') {
         print $server->renderTemplate('noconsent');
         exit;
     }
 }
Example #4
0
 /**
  * Returns attributes for route's callback
  * @param Request $request
  * @param string[]|callable $controller
  * @return array
  */
 public function getAttributes($request, $controller)
 {
     if (is_array($controller)) {
         //if controller's class and function names
         $reflection = new \ReflectionMethod($controller[0], $controller[1]);
     } else {
         //if callable
         $reflection = new \ReflectionFunction($controller);
     }
     // Get function's params
     $params = $reflection->getParameters();
     $attributes = [];
     // Filter required attributes
     foreach ($params as $param) {
         $attributes[] = nvl($request->attributes, $param->getName(), null);
     }
     return $attributes;
 }
Example #5
0
function demoapp()
{
    $sharedkey = 'abrakadabra';
    $corto = join("/", array_slice(explode("/", 'http' . (nvl($_SERVER, 'HTTPS') ? 's' : '') . '://' . $_SERVER['HTTP_HOST'] . $_SERVER['SCRIPT_NAME']), 0, -1));
    $self = $corto . '/index.php';
    $corto = $corto . '/corto.php';
    if (isset($_POST['doslo'])) {
        $request = array('__t' => 'samlp:LogoutRequest', '_ID' => ID(), '_Version' => '2.0', '_IssueInstant' => gmdate('Y-m-d\\TH:i:s\\Z', time()), '_Destination' => "{$corto}/sp/Mads/SLO", 'saml:Issuer' => array('__v' => $self), 'saml:NameID' => json_decode(stripcslashes($_POST['subject']), 1), '_NotOnOrAfter' => timeStamp(10));
        $location = $request['_Destination'];
        $location .= "?SAMLRequest=" . urlencode(base64_encode(gzdeflate(json_encode($request))));
        print render('redirect', array('location' => $location, 'message' => $request));
        exit;
    }
    if (isset($_POST['doit'])) {
        $idp = empty($_POST['idp']) ? NULL : $_POST['idp'];
        if (!$idp) {
            $idp = "sp";
        }
        $request = array('_ID' => ID(), '_Version' => '2.0', '_IssueInstant' => gmdate('Y-m-d\\TH:i:s\\Z', time()), '_Destination' => "{$corto}/{$idp}/Mads", '_ForceAuthn' => !empty($_REQUEST['ForceAuthn']) ? 'true' : 'false', '_IsPassive' => !empty($_REQUEST['IsPassive']) ? 'true' : 'false', 'AssertionConsumerServiceIndex' => 0, '_AttributeConsumingServiceIndex' => 5, '_ProtocolBinding' => 'JSON-Redirect', 'saml:Issuer' => array('__v' => $self));
        if (!empty($_REQUEST['IDPList'])) {
            foreach ((array) $_REQUEST['IDPList'] as $idp) {
                $idpList[] = array('_ProviderID' => $idp);
                $request['samlp:Scoping']['samlp:IDPList']['samlp:IDPEntry'] = $idpList;
            }
        }
        $relayState = 'Dummy RelayState ...';
        #$request['samlp:Scoping']['_ProxyCount'] = 2;
        $location = $request['_Destination'];
        $location .= "?SAMLRequest=" . urlencode(base64_encode(gzdeflate(json_encode($request)))) . ($relayState ? '&RelayState=' . urlencode($relayState) : '');
        print render('redirect', array('location' => $location, 'message' => $request));
        exit;
    }
    $relayState = $rs = $message = null;
    $response = nvl($_GET, 'SAMLResponse');
    $SAMLResponse = json_decode(gzinflate(base64_decode($response)), 1);
    if (isset($_POST['RelayState']) && ($rs = $_POST['RelayState'])) {
        $rs = '&RelayState=' . $rs;
    }
    print render('demo', array('action' => $self, 'SAMLResponse' => $SAMLResponse, 'message' => "RelayState: " . nvl($_GET, 'RelayState'), 'self' => $self));
}
Example #6
0
  <img src="http://www.kpnuts.com/email/unsubscribe/images/kp_btm.jpg" width="650" height="92" alt="You're a winner!" style="display:block" />
  
  <div id="form_area">
		<?php 
if ($usConfirm == "confirm") {
    echo "<div class=\"newsletter_intro\">You have been removed from the mailing list</div>\r\n";
} else {
    echo "<div class=\"newsletter_intro\">Please click the button below to unsubscribe from the United Biscuits mailing list</div>\r\n";
    ?>
  		<form style="width:650px; margin:0 auto; text-align:center;" name="us_form" id="us_form" method="post" action="http://www.kpnuts.com/email/unsubscribe/unsubscribe.php">
	 			<input type="hidden" name="us_confirm" value="confirm" />
				<input type="hidden" name="c" value="<?php 
    echo nvl($campaign);
    ?>
" />
  		  <input type="hidden" name="u" value="<?php 
    echo nvl($uid);
    ?>
" />
    		<input type="hidden" name="email" value="<?php 
    echo nvl($email);
    ?>
" /><br /><br />
		  	<input type="submit" value="Unsubscribe" />
	  	</form> 
		<?php 
}
?>
    <br /><br /><br /><br />
  </div>
</div>
 /**
  * Initialize corto session - to be able to handle multiple federations
  * and entities the session name is a hash of entityID concatenated with the federation name
  *
  * @return void
  */
 public function startSession()
 {
     $cookie_path = $_SERVER['SCRIPT_NAME'];
     $secure_cookie = nvl($_SERVER, 'HTTPS');
     // IIS returns 'off' if not https
     $secure_cookie = isset($secure_cookie) && $secure_cookie != 'off';
     session_write_close();
     // @todo remember general alert for non-https requests ...
     // @todo what about INTERNAL bindings ???
     session_set_cookie_params(0, $cookie_path, '', $secure_cookie);
     session_name(sha1($this->_metadata['current']['entityID']));
     session_start();
     #$_SESSION['__entity__'] = $this->_metadata['current']['entityID'];
 }
Example #8
0
 $update[] = "CONTENT_DETAIL_ENG= '" . $_POST['txtDetailEng'] . "'";
 $update[] = "BRIEF_LOC= '" . $_POST['txtBriefDescLoc'] . "'";
 $update[] = "BRIEF_ENG= '" . $_POST['txtBriefDescEng'] . "'";
 $update[] = "LAST_UPDATE_USER = '******'user_name'] . "'";
 $update[] = "LAST_UPDATE_DATE = NOW()";
 $update[] = "CAT_ID = '" . $CID . "'";
 ///$_POST['cmbCategory'] . "'";
 $update[] = "SUB_CAT_ID = '" . $subCatID . "'";
 $update[] = "EVENT_START_DATE = '" . ConvertDateToDB($_POST['txtStartDate']) . "'";
 $update[] = "EVENT_END_DATE = '" . ConvertDateToDB($_POST['txtEndDate']) . "'";
 $update[] = "PLACE_DESC_LOC = '" . nvl($_POST['txtPlaceLoc'], "") . "'";
 $update[] = "PLACE_DESC_ENG = '" . nvl($_POST['txtPlaceEng'], "") . "'";
 $update[] = "LAT = '" . nvl($_POST['txtLat'], "") . "'";
 $update[] = "LON  = '" . nvl($_POST['txtLon'], "") . "'";
 $update[] = "EVENT_START_TIME = '" . nvl($_POST['cmbHourStart'], '') . ':' . nvl($_POST['cmbMinuteStart'], '') . "'";
 $update[] = "EVENT_END_TIME = '" . nvl($_POST['cmbHourEnd'], '') . ':' . nvl($_POST['cmbMinuteEnd'], '') . "'";
 $update[] = "PRICE_RATE_LOC = '" . $_POST['txtPriceLoc'] . "'";
 $update[] = "PRICE_RATE_ENG = '" . $_POST['txtPriceEng'] . "'";
 $sql = "UPDATE trn_content_detail SET  " . implode(",", $update) . " WHERE CONTENT_ID = " . $conid;
 mysql_query($sql, $conn);
 if (count($_POST['photo_file']) > 0) {
     $sql_max = "SELECT MAX(ORDER_ID) AS MAX_ORDER FROM trn_content_picture WHERE CONTENT_ID = " . $conid . " AND CAT_ID = " . $CID;
     //$_POST['cmbCategory'];
     $query_max = mysql_query($sql_max, $conn) or die($sql_max);
     $row_max = mysql_fetch_array($query_max);
     $max = $row_max['MAX_ORDER'];
     $max++;
     foreach ($_POST['photo_file'] as $k => $file) {
         $filename = admin_move_image_upload_dir('content_' . $CID, end(explode('/', $file)), 1000, '', false, 150, 150);
         unset($insert);
         $insert['CONTENT_ID'] = $conid;
Example #9
0
								,sb.SUB_CONTENT_CAT_DESC_ENG
							FROM trn_content_category cc
							LEFT OUTER JOIN trn_content_sub_category sb ON sb.CONTENT_CAT_ID = cc.CONTENT_CAT_ID
							WHERE cc.REF_MODULE_ID = $MID 
								AND cc.flag <> 2 
								AND cc.CONTENT_CAT_ID  = $CID ";
								if (isset($SCID) && nvl($SCID, '0') != '0') {
				$sql .= "	AND sb.SUB_CONTENT_CAT_ID = $SCID ";
			}
				$sql .="    ORDER BY cc.ORDER_DATA DESC 
								,sb.order_data DESC
							) a
						LEFT JOIN trn_content_detail cd ON a.CONTENT_CAT_ID = cd.CAT_ID 
						where cd.CONTENT_STATUS_FLAG <>  2 ";
						
						if (isset($SCID) && nvl($SCID, '0') != '0') {
				$sql .= "	AND cd.SUB_CAT_ID = $SCID ";
			}
								
						$sql .= " ORDER BY cd.ORDER_DATA desc ";

			     $query = mysql_query($sql,$conn);
			     while($row = mysql_fetch_array($query)) {
			     	
			 
		?>

		<li class="ui-state-default" data-order="<?=$row['ORDER_DATA'] ?>" data-id="<?=$row['CONTENT_ID'] ?>"><?=$row['CONTENT_DESC_LOC'] ?></li>
	<? } ?>  
	</ul>
</div>	
Example #10
0
					$textLocation = ' class="text-des"  style="height: 15px;" ';

				$textTicket = ' class="text-ticket" ';
				if (nvl($row['PRICE_RATE'], '') == '')
					$textTicket = ' class="text-des"  style="height: 15px;" ';
			?>
				
				<div class="box-when">
					<h3>WHEN</h3>
					<p class="text-date"><? echo ConvertDate($row['EVENT_START_DATE']) ?> - <? echo ConvertDate($row['EVENT_END_DATE']) ?></p>
					<p class="text-time"><? echo $row['EVENT_START_TIME'] ?> - <? echo $row['EVENT_END_TIME'] ?></p>
					<p <?=$textLocation ?>><? echo nvl($row['PLACE_DESC'], '')  ?></p>
				</div>
				<div class="box-ticket">
					<h3>TICKET</h3>
					<p <?=$textTicket ?>><?= nvl($row['PRICE_RATE'], '') ?></p>
				</div>
				<div class="box-news-text">
					<p>
						<?=nl2br(strip_tags($row['CONTENT_DETAIL'], $allowTag)); ?>
					</p>
				</div>

<?php
	$SqlFile = "SELECT * FROM trn_content_picture WHERE CONTENT_ID = ".$CONID." AND CAT_ID = ".$CID." AND DIV_NAME =  'Other' ORDER BY ORDER_ID ASC";
	$QueryFile = mysql_query($SqlFile) or die(mysql_error());
	$numFile = mysql_num_rows($QueryFile);
	if($numFile > 0){
?>
				<div class="box-otherfile-main">
					<div class="box-title cf">
Example #11
0
<?php

include "/nfslocal/www/include/db/dbconnect.php";
//get vars
$uid = $_REQUEST["u"];
//person unique ID
$url_id = $_REQUEST["r"];
//url_id for link in URL table
//get url details
$urlsql = "SELECT url, description, code, alert, personalise, active, campaign \n\t\t \t\t\t  FROM url\n          \tWHERE url_id='{$url_id}' and active = 'true' LIMIT 1";
$geturl = mysql_query($urlsql);
$url = mysql_fetch_array($geturl);
//set campaign code
// use posted campaign code, or the one from the table, this means that landing pages can have the came link, but log to different campaigns
$campaign = nvl($_REQUEST["c"], $url[6]);
$campaigntable = $campaign . "_log";
//log click through
//$mysqltime = strftime ("%y/%m/%d %H:%M:%S" , time());
$logsql = "INSERT INTO {$campaigntable}(log_date, campaign, uid, action, details) VALUES (now(), '{$campaign}', '{$uid}', '{$url['2']}', '{$url['1']}')";
$dolog = mysql_query($logsql);
//get passthrough details (if personalise = true)
if ($url[4] == "true") {
    $campaignemail = $campaign . "_email";
    $dsql = "SELECT * FROM {$campaignemail} WHERE uid = '{$uid}'";
    $getd = mysql_query($dsql);
    //personalise the link
    $d = mysql_fetch_array($getd);
    foreach ($d as $k => $v) {
        $url[0] = str_replace("#={$k}=#", $v, $url[0]);
    }
}
function getCatBread($cid, $mid, &$breadArr)
{
    $sqlStr = "select * from trn_content_category where CONTENT_CAT_ID = " . $cid;
    $rs = mysql_query($sqlStr) or die(mysql_error());
    if ($_SESSION['LANG'] == 'TH') {
        $selectedColName = 'CONTENT_CAT_DESC_LOC';
    } else {
        $selectedColName = 'CONTENT_CAT_DESC_ENG';
    }
    while ($row = mysql_fetch_array($rs)) {
        //	echo count($breadArr);
        if (count($breadArr) == 0) {
            $breadArr[] = '<li class="active">' . $row[$selectedColName] . '</li>';
        } else {
            if (nvl($row['IS_LAST_NODE'], 'Y') == 'Y') {
                $breadArr[] = '<li ><a href="da-all-black.php?MID=' . $mid . '&CID=' . $row['CONTENT_CAT_ID'] . '">' . $row[$selectedColName] . '&nbsp;&nbsp;&nbsp;>&nbsp;&nbsp;</a></li>';
            } else {
                $breadArr[] = '<li ><a href="da-category-black.php?MID=' . $mid . '&CID=' . $row['CONTENT_CAT_ID'] . '">' . $row[$selectedColName] . '&nbsp;&nbsp;&nbsp;>&nbsp;&nbsp;</a></li>';
            }
        }
    }
}
														LINK_URL
													FROM
														trn_content_sub_category
													WHERE
														CONTENT_CAT_ID = " . $categoryRow['CONTENT_CAT_ID'];
					$sqlSubCategory .= " AND flag  = 0
													ORDER BY
														ORDER_DATA desc";

					$rsSubMenu = mysql_query($sqlSubCategory) or die(mysql_error());
					$subCount = 1;
					echo '<ul class="submenu-left">';
					while ($subCategoryRow = mysql_fetch_array($rsSubMenu)) {

						$subLink = "ve-category.php?c=" . $categoryRow['CONTENT_CAT_ID'] . "&SCID=" . $subCategoryRow['SUB_CONTENT_CAT_ID'];
						if (nvl($subCategoryRow['LINK_URL'], '') != '')
							$subLink = $subCategoryRow['LINK_URL'];

						echo '<li class="submenu' . $subCount . '"><a href="' . $subLink . '">' . $subCategoryRow['SUB_CONTENT_DESC'] . '</a></li>';
						$subCount++;
					}
					echo '</ul>';

				}

				echo '</li>';
				$mainMenuCount++;

			}
			?>
			
Example #14
0
        ?>
/opt.php?debug=<?php 
        echo nvl($session['mode_debug']) == 1 ? 0 : 1;
        ?>
">Debug Modus <?php 
        echo nvl($session['mode_debug']) == 1 ? "Aus" : "An";
        ?>
</A>&nbsp;&nbsp;
    |&nbsp;&nbsp;<a href="<?php 
        echo $CFG->wwwroot;
        ?>
/opt.php?admin=<?php 
        echo nvl($session['mode_admin']) == 1 ? 0 : 1;
        ?>
">Admin Modus <?php 
        echo nvl($session['mode_admin']) == 1 ? "Aus" : "An";
        ?>
</A>&nbsp;&nbsp;
    |&nbsp;&nbsp;<a href="<?php 
        echo $CFG->wwwroot;
        ?>
/admin/admin.php">Admin Seite</A>&nbsp;&nbsp;
    <?php 
    }
    ?>
  <?php 
} else {
    ?>
  <a href="<?php 
    echo $CFG->wwwroot;
    ?>
Example #15
0
 ?>
		<?
		$MID = $_GET['MID'];
		$id = $_GET['conid'];

		$CID = $_GET['cid'];
		$LV = $_GET['LV'];
		$SCID = $_GET['SCID'];
		$subfixAddAndEdit = '&cid=' . $CID . '&LV=' . $LV;
		if (isset($SCID) && nvl($SCID, '0') != '0') {
			$subfixAddAndEdit .= '&SCID=' . $SCID;
		}

		$navigateBackPage = '';
		$navigateBackPage = 'content_view.php?cid=' . $CID . '&MID=' . $MID . '&LV=' . $LV;
		if (nvl($SCID, '0') != '0')
			$navigateBackPage .= '&SCID=' . $SCID;

		$sql = "SELECT cd.*
										,cc.CONTENT_CAT_DESC_ENG
										,cc.CONTENT_CAT_DESC_LOC
										,cc.IS_LAST_NODE
										,sc.SUB_CONTENT_CAT_DESC_ENG
										,sc.SUB_CONTENT_CAT_DESC_LOC
									FROM trn_content_detail cd
									LEFT JOIN trn_content_category cc ON cc.CONTENT_CAT_ID = cd.CAT_ID
									LEFT OUTER JOIN trn_content_sub_category sc ON sc.SUB_CONTENT_CAT_ID = cd.SUB_CAT_ID";
									
									if($MID == $contact_us){
										$sql .= " where cd.CONTENT_STATUS_FLAG =  2 " ;
									}else{
Example #16
0
include "../application.php";
/* form has been submitted */
if (isset($HTTP_POST_VARS)) {
    $frm = $HTTP_POST_VARS;
    //mydebug($frm);
    if (isset($frm['download'])) {
        /* if Packer not choosen, then check if user has an default packer */
        if (nvl($frm['packerID'], 0) == 0) {
            $packerID = isset($session['usepackerID']) ? $session['usepackerID'] : 0;
        } else {
            /* Packer choosen, so set default-packer for user if not set */
            $packerID = $frm['packerID'];
            setdefault($session['usepackerID'], $packerID);
        }
        // get the downloadURL for the File
        $goto = get_downloadURL(nvl($frm['textID']), $packerID);
        //$goto = empty($session["wantsurl"]) ? "$CFG->wwwroot/main.php" : $session["wantsurl"];
        header("Location: {$goto}");
        die;
    }
}
$DOC_TITLE = "Download";
include "{$CFG->templatedir}/header.php";
include "templates/download.inc";
include "{$CFG->templatedir}/footer.php";
/******************************************************************************
 * FUNCTIONS
 *****************************************************************************/
?>

Example #17
0
function wday(&$dnummer)
{
    $wday = array("", "Mo", "Di", "Mi", "Do", "Fr", "Sa", "So");
    return nvl($wday[$dnummer]) . " ";
}
?>
</span>
				</h1>
			</div>
			<hr class="line-gray"/>


			<?php 
if ($_SESSION['LANG'] == 'TH') {
    $LANG_SQL = "CONTENT_DESC_LOC AS CONTENT_DESC";
} else {
    if ($_SESSION['LANG'] == 'EN') {
        $LANG_SQL = "CONTENT_DESC_ENG AS CONTENT_DESC";
    }
}
$sql = " SELECT " . $LANG_SQL . "\r\n\t\t\t\t\t\t\tFROM trn_content_detail  \r\n\t\t\t\t\t\t\tWHERE CONTENT_STATUS_FLAG = 0 AND CAT_ID = {$position_sub_cat} AND CONTENT_ID = " . nvl($CONID, -2);
$sql .= " order by ORDER_DATA desc";
$query = mysql_query($sql, $conn);
$row = mysql_fetch_array($query);
$positionName = $row['CONTENT_DESC'];
?>

				<form action="e-application-action.php?add" method="post" name="formcms" id = "myform" enctype="multipart/form-data" >
					<div class="box-contact-from">
						<div class="box-row cf">
							<div class="box-left">
								<p class="con">Specify type of job onterested</p>
							</div>
							<div class="box-right">
								<div class="box-input-text">
									
Example #19
0
    $index++;
}
?>

					</div>
					<div class="box-pagination-main cf">
						<ul class="pagination">
					<?php 
$countContentSql = "SELECT count(1) as ROW_COUNT FROM\n\t\t\t\t\t\t\t\t\t\t\t\ttrn_content_category cat\n\t\t\t\t\t\t\t\t\t\t\tINNER JOIN trn_content_detail content ON content.CAT_ID = cat.CONTENT_CAT_ID\n\t\t\t\t\t\t\t\t\t\t\tWHERE\n\t\t\t\t\t\t\t\t\t\t\t\tcat.REF_MODULE_ID = {$new_and_event}\n\t\t\t\t\t\t\t\t\t\t\tAND cat.flag = 0\n\t\t\t\t\t\t\t\t\t\t\tAND cat.CONTENT_CAT_ID = {$museum_event_cat_id}\n\t\t\t\t\t\t\t\t\t\t\tAND content.SUB_CAT_ID = {$event_sub_cat_id}\n\t\t\t\t\t\t\t\t\t\t\tAND content.APPROVE_FLAG = 'Y'\n\t\t\t\t\t\t\t\t\t\t\tAND content.CONTENT_STATUS_FLAG  = 0 ";
$countContentSql .= $search_sql;
$queryCount = mysql_query($countContentSql, $conn);
$dataCount = mysql_fetch_assoc($queryCount);
$contentCount = $dataCount['ROW_COUNT'];
$maxPage = ceil($contentCount / 30);
$extraClass = '';
if (nvl($currentPage, -1)) {
    $currentPage = 1;
}
if ($currentPage == 1) {
    $extraClass = 'class="deactive"';
}
echo $pageStart;
echo '<li ' . $extraClass . '><a href="?PG=' . ($currentPage - 1) . '" class="btn-arrow-left"></a></li>';
for ($idx = 0; $idx < 3; $idx++) {
    if ($currentPage + $idx > $maxPage) {
        break;
    }
    $activeClass = '';
    if ($idx == 0) {
        $activeClass = ' class="active"';
    }
 protected static function _array2xml($hash, $elementName, XMLWriter $writer, $level = 0, $visiblenamespaces = array())
 {
     if ($level > self::MAX_RECURSION_LEVEL) {
         throw new Exception('Recursion threshold exceed on element: ' . $elementName . ' for hashvalue: ' . var_export($hash, true));
     }
     if ($hash == self::PLACEHOLDER_VALUE) {
         // Ignore placeholders
         return;
     }
     if (!isset($hash[0])) {
         $writer->startElement($elementName);
     }
     // handle attributes / namespaces first
     // attribute key prefix is a prefix of private key prefix thus first
     // test for private key prefis
     foreach ((array) $hash as $key => $value) {
         if (strpos($key, self::PRIVATE_KEY_PREFIX) === 0) {
             # [__][<x>] is used for private attributes for internal consumption
         } elseif (strpos($key, self::ATTRIBUTE_KEY_PREFIX) === 0) {
             if (substr($key, 1, 6) == 'xmlns:' && nvl($visiblenamespaces, substr($key, 7))) {
                 continue;
             }
             $writer->writeAttribute(substr($key, 1), $value);
             if (substr($key, 1, 6) == 'xmlns:') {
                 $visiblenamespaces[substr($key, 7)] = true;
             }
         }
     }
     if (preg_match("/^(.+):/", $elementName, $nsprefix)) {
         if (!nvl($visiblenamespaces, $nsprefix[1])) {
             $visiblenamespaces[$nsprefix[1]] = true;
             $writer->writeAttribute('xmlns:' . $nsprefix[1], self::$_namespacesbyprefix[$nsprefix[1]]);
         }
     }
     // and then elements etc.
     foreach ((array) $hash as $key => $value) {
         if (is_int($key)) {
             // Normal numeric index, value is probably a hash structure, recurse...
             self::_array2xml($value, $elementName, $writer, $level + 1, $visiblenamespaces);
         } elseif ($key === self::VALUE_KEY) {
             $writer->text($value);
         } elseif (strpos($key, self::PRIVATE_KEY_PREFIX) === 0) {
             # [__][<x>] is used for private attributes for internal consumption
         } elseif (strpos($key, self::ATTRIBUTE_KEY_PREFIX) === 0) {
         } else {
             self::_array2xml($value, $key, $writer, $level + 1, $visiblenamespaces);
         }
     }
     if (!isset($hash[0])) {
         $writer->endElement();
     }
 }
Example #21
0
function build_element($s, $company)
{
    $element_table = $company . "_element";
    $ei_table = $company . "_element_instance";
    $sql = "SELECT {$ei_table}.content,{$element_table}.name \n\t\t\t\t  FROM {$element_table} LEFT JOIN {$ei_table} ON {$element_table}.element_id = {$ei_table}.element_id \n\t\t\t\t  WHERE {$ei_table}.section_instance_id = '{$s['instance_id']}'";
    $esql = mysql_query($sql);
    while ($e = mysql_fetch_array($esql)) {
        // replace section with content
        $s["content"] = str_replace("##==" . $e["name"] . "==##", $e["content"], $s["content"]);
    }
    return nvl($s["content"]);
}
     } else {
         $session['notice'] .= "Titel nicht ge&auml;ndert!<br>";
     }
 }
 if (!empty($frm['abstract'])) {
     if (change_abstract($frm['id'], $frm['abstract'])) {
         $session['notice'] .= "Kurzbeschreibung erfolgreich ge&auml;ndert!<br>";
     } else {
         $session['notice'] .= "Kurzbeschreibung nicht ge&auml;ndert!<br>";
     }
 }
 if (isset($frm['upload'])) {
     $errormsg = validate_form($frm, $errors);
     //print_r($frm);
     if (empty($errormsg)) {
         if (!upload_file($frm['id'], $frm['file']['tmp_name'], $frm['file']['ext'], $frm['file']['fileID'], nvl($frm['length']), 0)) {
             $id = $frm['id'];
             $DOC_TITLE = "Upload";
             include "{$CFG->templatedir}/header.php";
             include "templates/upload_translation_form.inc";
             include "{$CFG->templatedir}/footer.php";
             die;
         } else {
             $session['notice'] .= "Datei erfolgreich hochgeladen<br>";
         }
     } else {
         $session['notice'] = $errormsg;
         $stay = 1;
     }
 }
 // endif is upload?!
 /**
  * Handle an authentication response and send it on to the SP.
  * Handle filtering for both incoming and outgoing response
  *
  * @throws Corto_Module_Services_Exception
  * @param  $params
  * @return void
  */
 public function assertionConsumerService($params)
 {
     if ($this->_server->callfilters('init')) {
         $receivedResponse = $this->_server->getBindingsModule()->receiveResponse($params);
         // Get the ID of the Corto Request message
         if (!$receivedResponse['_InResponseTo']) {
             $message = "Unsollicited assertion (no InResponseTo in message) not supported!";
             throw new Corto_Module_Services_Exception($message);
         }
         $receivedRequest = $this->_server->getReceivedRequestFromResponse($receivedResponse['_InResponseTo']);
         $state = get_defined_vars();
         $filterparams = array('request' => $receivedRequest, 'response' => $receivedResponse, 'server' => $this->_server);
         $filters = array_merge($this->_server->getRemoteMD($receivedResponse['saml:Issuer']['__v'], 'IDP', 'corto:responseInputFilter', null, array()), $this->_server->getCurrentMD('SP', 'corto:responseOutputFilter', null, array()));
     }
     // SP side filters
     if ($this->_server->callfilters("responsein", $state, $filters, $filterparams)) {
         extract($state);
         unset($state);
         $receivedResponse = $filterparams['response'];
         unset($filterparams);
         $proxySP = null;
         if ($proxyIDP = nvl($receivedRequest['__'], 'ProxyIDP')) {
             $proxySP = $params['EntityID'];
             $this->_server->setCurrentEntity($proxyIDP);
             $this->_server->startSession();
         }
         $_SESSION['cachedresponses'][$receivedResponse['saml:Issuer']['__v']] = $receivedResponse;
         $this->AssertionConsumerService2($receivedRequest, $receivedResponse, $proxySP);
     }
 }
Example #24
0
                                                    <div class="caption lfl " data-x="20" data-y="258" data-speed="1000" data-start="1500" data-easing="easeInOutQuint">
                                                       <p style="font-size:370%;color:#fff;font-family:Roboto;font-weight:200;line-height:1"><?php 
echo nvl($imagen['referencia']);
?>
</p>
                                                    </div>
                                                    <? } ?>
                                                    <!--div class="caption lfr " data-x="20" data-y="309" data-speed="1000" data-start="2000" data-easing="easeInOutCubic">
                                                       <p style="font-family:Roboto;color:#fff;font-size:130%;font-weight:300;font-style:italic;line-height:1"><?php 
echo nvl($imagen['vinculo']);
?>
</p>
                                                    </div-->
                                                    <? if( isset($imagen['referencia']) &&  $imagen['vinculo'] != "" ){ ?> 
                                                    <div class="caption lfb btn" data-x="585" data-y="285" data-speed="1000" data-start="3000" data-easing="easeInOutBounce"><a href="#" style="line-height:1;font-weight:400;font-family:Roboto;"><?php 
echo nvl($imagen['vinculo']);
?>
</a></div>
                                                    <? } ?>
                                                 </li>

                                                <? } ?> 

                                              </ul>
                                              <div class="tp-bannertimer"></div>
                                           </div>
                            </div>
                           <script type="text/javascript">
                              var tpj=jQuery;
                                            tpj.noConflict();
                                        
function db_del($key, $subkey = '_')
{
    $id = db_start($key);
    if ($subkey == '*') {
        $res = $_SESSION;
        session_destroy();
    } else {
        $res = nvl($_SESSION, $subkey);
        unset($_SESSION[$subkey]);
        if (empty($_SESSION)) {
            session_destroy();
        }
    }
    db_end($id);
    return $res;
}
			$update = "";
			$update[] = "ORDER_DATA = " . $val;

			$sql = "UPDATE trn_museum_profile_picture SET  " . implode(",", $update) . " WHERE PIC_ID =" . $k;
			mysql_query($sql, $conn) or die($sql);
		}
	}

	if (isset($_POST['catMuseum'])) {
		$sql = "delete from trn_mapping_museum_category where MUSEUM_DETAIL_ID = " . $_POST['museumId'];

		mysql_query($sql, $conn) or die($sql);

		foreach ($_POST['catMuseum'] as $k => $val) {
			unset($insert);

			$arrVal = explode("|", $val);
			//echo 'val : ' . $val;
			//echo 'Arr : ' . $arrVal ;
			$insert['MUSEUM_DETAIL_ID'] = $_POST['museumId'];
			$insert['CONTENT_CAT_ID'] = nvl($arrVal[0], 0);
			$insert['CONTENT_SUB_CAT_ID'] = nvl($arrVal[1], 0);

			$sql = "INSERT INTO trn_mapping_museum_category (" . implode(",", array_keys($insert)) . ") VALUES (" . implode(",", array_values($insert)) . ")";
			mysql_query($sql, $conn) or die($sql);
		}
	}

	header('Location: ' . 'account-museum-detail.php');
}
?>
    $insert['LAST_UPDATE_DATE'] = "NOW()";
    $insert['FLAG'] = "0";
    $insert['REF_SUB_CONTENT_CAT_ID'] = "'" . $refSubModule . "'";
    $insert['IS_LAST_NODE'] = "'" . $isLastNode . "'";
    $sql = "INSERT INTO trn_content_sub_category (" . implode(",", array_keys($insert)) . ") VALUES (" . implode(",", array_values($insert)) . ")";
    mysql_query($sql, $conn) or die($sql);
    header('Location: ' . $returnPage);
}
if (isset($_GET['edit'])) {
    $update = "";
    $chkHasSubCategory = $_POST['chkHasSubCategory'];
    $isLastNode = "";
    $refSubModule = 0;
    if ($chkHasSubCategory) {
        $isLastNode = "N";
        if (isset($SCID) && nvl($SCID, '') != '') {
            $refSubModule = $SCID;
        }
    } else {
        $isLastNode = "Y";
    }
    //$update[] = "CONTENT_CAT_ID = '" . $_POST['cmbCategory'] . "'";
    $update[] = "SUB_CONTENT_CAT_DESC_LOC = '" . $_POST['txtDescLoc'] . "'";
    $update[] = "SUB_CONTENT_CAT_DESC_ENG = '" . $_POST['txtDescEng'] . "'";
    $update[] = "LAST_UPDATE_USER = '******'";
    $update[] = "LAST_UPDATE_DATE = NOW()";
    $update[] = "REF_SUB_CONTENT_CAT_ID = '" . $refSubModule . "'";
    $update[] = "IS_LAST_NODE = '" . $isLastNode . "'";
    $sql = "UPDATE trn_content_sub_category SET  " . implode(",", $update) . " WHERE SUB_CONTENT_CAT_ID = " . $_GET['subcid'];
    mysql_query($sql, $conn);
    header('Location: ' . $returnPage);
				<?php 
while ($row = mysql_fetch_array($query)) {
    ?>
					<div class="Main_Content" data-id="<?php 
    echo $row['SUB_CONTENT_CAT_ID'];
    ?>
" >
						<div class="floatL checkboxContent"><input type="checkbox" name="check" value="<?php 
    echo $row['SUB_CONTENT_CAT_ID'];
    ?>
"></div>
						 
						<div class="floatL nameContent">
							<?
							$nextPage = '';
							if (nvl($row['IS_LAST_NODE'], 'Y') == 'Y') {
								//content no LV use current LV
								$nextPage = 'content_view.php?cid=' . $CID . '&MID=' . $MID . '&LV=' . $LV . '&SCID=' . $row['SUB_CONTENT_CAT_ID'];
							} else {
								//recursive to self page
								$nextPage = 'main_sub_category_view.php?cid=' . $CID . '&MID=' . $MID . '&LV=' . ($LV + 1) . '&SCID=' . $row['SUB_CONTENT_CAT_ID'];
							}
						?>
							<div><?
							//echo '<a href="sub_category_view.php?scid='.$row['SUB_CONTENT_CAT_ID'].'&MID='.$MID.'&cid='.$CID.'">'. $row['SUB_CONTENT_CAT_DESC_LOC'].'</a>'
							echo '<a href="' . $nextPage . '">' . $row['SUB_CONTENT_CAT_DESC_LOC'] . '</a>';
						?></div>
							<div>วันที่สร้าง <?
							echo ConvertDate($row['CREATE_DATE']);
						?> | วันที่ปรับปรุง <?
						echo ConvertDate($row['LAST_UPDATE_DATE']);
 $insert['CONTENT_STATUS_FLAG'] = "'0'";
 $insert['CONTENT_VIEW_COUNT'] = "0";
 $insert['BRIEF_LOC'] = "'" . $_POST['txtBriefDescLoc'] . "'";
 $insert['BRIEF_ENG'] = "'" . $_POST['txtBriefDescEng'] . "'";
 $insert['MUSUEM_ID'] = "'" . $_POST['museumID'] . "'";
 $insert['APPROVE_FLAG'] = "'N'";
 $insert['USER_CREATE'] = "'" . $_SESSION['user_name'] . "'";
 $insert['CREATE_DATE'] = "NOW()";
 $insert['LAST_UPDATE_USER'] = "******" . $_SESSION['user_name'] . "'";
 $insert['LAST_UPDATE_DATE'] = "NOW()";
 $insert['EVENT_START_DATE'] = "'" . ConvertDateToDB($_POST['txtStartDate']) . "'";
 $insert['EVENT_END_DATE'] = "'" . ConvertDateToDB($_POST['txtEndDate']) . "'";
 $insert['PLACE_DESC_LOC'] = "'" . nvl($_POST['txtPlaceLoc'], "") . "'";
 $insert['PLACE_DESC_ENG'] = "'" . nvl($_POST['txtPlaceEng'], "") . "'";
 $insert['LAT'] = "'" . nvl($_POST['txtLat'], "") . "'";
 $insert['LON'] = "'" . nvl($_POST['txtLon'], "") . "'";
 $insert['EVENT_START_TIME'] = "'" . $_POST['startdate'] . "'";
 $insert['EVENT_END_TIME'] = "'" . $_POST['enddate'] . "'";
 $insert['PRICE_RATE_LOC'] = "'" . $_POST['txtPriceLoc'] . "'";
 $insert['PRICE_RATE_ENG'] = "'" . $_POST['txtPriceEng'] . "'";
 $sql = "INSERT INTO  trn_content_detail (" . implode(",", array_keys($insert)) . ") VALUES (" . implode(",", array_values($insert)) . ")";
 mysql_query($sql, $conn) or die($sql . ' Err : ' . mysql_error());
 $retrunID = mysql_insert_id();
 if (count($_POST['EVENT_PIC_file']) > 0) {
     $sql_max = "SELECT MAX(ORDER_ID) AS MAX_ORDER FROM trn_content_picture WHERE CONTENT_ID = " . $retrunID . " AND IMG_TYPE = 1 ";
     //$_POST['cmbCategory'];
     $query_max = mysql_query($sql_max, $conn) or die($sql_max);
     $row_max = mysql_fetch_array($query_max);
     $max = $row_max['MAX_ORDER'];
     $max++;
     foreach ($_POST['EVENT_PIC_file'] as $k => $file) {
Example #30
0
/**
 * Returns the URL of the HTTP_REFERER, less the querystring portion
 * @return string
 */
function get_referer()
{
    return strip_querystring(nvl($_SERVER['HTTP_REFERER']));
}