}); $("#rcpassword").blur(function(){ registerPassCheck2(); }); <?php if (isset($_POST["rcountry"])) { ?> setTimeout(function () { $("#rcountry option").filter(function(index) { return encodeURIComponent($(this).val()) === '<?php echo encodeURIComponent($country); ?> '; }).prop('selected', true); setTimeout(function () { checkRCountry(); $("#rcountry").trigger('click'); setTimeout(function () { $("#riran_state option").filter(function(index) { return encodeURIComponent($(this).val()) === '<?php echo encodeURIComponent($iran_state); ?> '; }).prop('selected', true); $("#riran_state").trigger('click'); },10); },100); },10); <?php } ?> </script> <?php }
<span class="right" style="cursor: pointer;" onclick="gotoPage('full',500,'index/product.php?category=<?php echo encodeURIComponent($row[1]); ?> &sub_category=<?php echo encodeURIComponent($row[2]); ?> ');"><?php echo getCategory($row[2]); ?> </span> <span class="right">></span> <span class="right" style="cursor: pointer;" onclick="gotoPage('full',500,'index/product.php?category=<?php echo encodeURIComponent($row[1]); ?> &sub_category=<?php echo encodeURIComponent($row[2]); ?> &ptoshow=<?php echo $row[0]; ?> ');"><?php echo $row[3]; ?> </span> <?php } ?> </div> <div class="controlpanel-item" style="cursor: default;" > <span class="right" style="font-weight: bold;">پر بازدید ترین خبر/مقاله:</span> <?php
?> <div class="mitem <?php if ($mrows[0] == $selected_id) { echo "selected"; } ?> " onclick="showMsg(<?php echo $mrows[0]; ?> );" > <span class="datetime" ><?php echo $mrows[3] . " " . $mrows[4]; ?> </span> <div class="text" ><a href="?command=<?php echo encodeURIComponent('page=message|&|mode=show_msg|&|section_id=' . $mrows[0]); ?> " ><span style='font-weight: bold;' >Name: </span><?php echo $mrows[1]; ?> <br><span style='font-weight: bold;' >Emial: </span><?php echo $mrows[2]; ?> </a></div> </div> <?php } ?> </div> </div> <div id="about-shadow">
function sendEmail($to, $message) { global $PREFERRED_HOSTNAME, $UPDATE_EMAIL_ADDRESS, $UPDATE_EMAIL_NAME, $UPDATE_MAIL_SERVER, $UPDATE_MAIL_SERVER_PORT, $UPDATE_MAIL_SERVER_SSL, $UPDATE_MAIL_SERVER_USERNAME, $UPDATE_MAIL_SERVER_PASSWORD, $emailer_transport, $emailer_mailer; try { if (!isset($emailer_transport)) { if (!isset($emailer_transport)) { if (!isset($UPDATE_MAIL_SERVER)) { $emailer_transport = Swift_SmtpTransport::newInstance(); } else { if ($UPDATE_MAIL_SERVER_SSL) { $emailer_transport = Swift_SmtpTransport::newInstance($UPDATE_MAIL_SERVER, $UPDATE_MAIL_SERVER_PORT, 'ssl'); } else { $emailer_transport = Swift_SmtpTransport::newInstance($UPDATE_MAIL_SERVER, $UPDATE_MAIL_SERVER_PORT); } $emailer_transport->setUsername($UPDATE_MAIL_SERVER_USERNAME)->setPassword($UPDATE_MAIL_SERVER_PASSWORD); } } } $emailMessage = Swift_Message::newInstance()->setSubject("New Updates to Googulator")->setFrom(array($UPDATE_EMAIL_ADDRESS => $UPDATE_EMAIL_NAME))->setTo($to)->setBody($message . "\r\n\r\n" . "Tired of these messages? Use the following url to unsubscribe:\r\n" . "http://{$PREFERRED_HOSTNAME}/?unsubscribe=" . encodeURIComponent($to)); if (!isset($emailer_mailer)) { $emailer_mailer = Swift_Mailer::newInstance($emailer_transport); } return $emailer_mailer->send($emailMessage); } catch (Exception $e) { return false; } /*$headers = 'From: ' . $UPDATE_EMAIL_ADDRESS . "\r\n" . 'Reply-To: ' . $UPDATE_EMAIL_ADDRESS . "\r\n" . 'X-Mailer: PHP/' . phpversion();; $message = $message . "\r\n\r\n" . "Tired of these messages? Use the following url to unsubscribe:\r\n" . "http://$PREFERRED_HOSTNAME/?unsubscribe=" . encodeURIComponent($to); return mail($to,"New Updates to Googulator",$message,$headers); */ }
$album = $album_title; } } if (isset($_GET['album'])) { $album = $_GET['album']; } $album = mysql_real_escape_string($album); $query = mysql_query("SELECT * FROM gallerybykk_" . $sitelang . " WHERE state = 1 AND album = '{$album}' ;", $db); if (!$query) { die("Error reading query: " . mysql_error()); } if ($grow = mysql_fetch_row($query)) { ?> <script type="text/javascript"> $("#page-nav").css({'opacity':'0'}).empty().load('index/pagenavigator.php?page=addgallery&album=<?php echo encodeURIComponent($album); ?> ', function() { $("#page-nav").animate({'opacity':'1'}, 300); }); </script> <div style="width: 100%;height: 100%;overflow: hidden;" id="addgallery-container"> <div class="div-title">EDIT ALBUM</div> <form action="index/addgallery.php?mode=applyedit_album" method="POST" enctype="multipart/form-data" id="addgallery_form" > <input type="hidden" name="album" value="<?php echo $grow[1]; ?> "> <div class="div-row" > <div class="input-div" > <div class="lable" ><span class="red" >*</span>Album</div>
public function getServiceUrl($uri) { return $this->config->getBaseUrl() . ResourceClient::$URL_RESOURCE_SERVICE . encodeURIComponent($uri); }
/* INDEPENDENT CSS/JS/THEME FOR PAGE Author: -ptr.nov-*/ $this->sideCorp = 'Modul HRM'; /* Title Select Company pada header pasa sidemenu/menu samping kiri */ $this->sideMenu = 'hrd_modul'; /* kd_menu untuk list menu pada sidemenu, get from table of database */ $this->title = Yii::t('app', 'HRM - Organization'); /* title pada header page */ //$this->params['breadcrumbs'][] = $this->title; /* belum di gunakan karena sudah ada list sidemenu, on plan next*/ function encodeURIComponent($str) { $revert = array('%21' => '!', '%2A' => '*', '%27' => "'", '%28' => '(', '%29' => ')'); return strtr(rawurlencode($str), $revert); } //print_r($dataProvider->getModels()); //echo \yii\helpers\Json::encode($dataProvider->getModels()); $itemJsonStr = encodeURIComponent(Json::encode($dataProvider->getModels())); $itemJsonStr2 = Json::encode($dataProvider->getModels()); //$this->registerJs('Print("var data=\"" . $itemJsonStr . "\";");'); //echo $itemJsonStr2; //echo $itemJsonStr; $this->registerJs(' jQuery.noConflict(); (function($) { var m_timer = null; var datax=\'' . $itemJsonStr . '\'; $(document).ready(function () { $.ajaxSetup({ cache: false }); ResizePlaceholder(); orgDiagram = $("#orgdiagram").orgDiagram({
?> );"></div> <div class="btn edit" onclick="editProduct(<?php echo $allrows[$start_counter + $i][0]; ?> );"></div> <div class="visit-counter" >Visit: <?php echo $allrows[$start_counter + $i][7]; ?> </div> </div> <?php } ?> <a href="?cmode=full&command=<?php echo encodeURIComponent("index/product.php?category=" . $category . "&sub_category=" . $sub_category . "&ptoshow=" . $allrows[$start_counter + $i][0]); ?> " > <div class="p-inner none-pattern" onclick="showProduct(<?php echo $allrows[$start_counter + $i][0]; ?> );"> <span class="first"> <?php echo $allrows[$start_counter + $i][1]; echo $allrows[$start_counter + $i][5]; ?> </span> <span class="second"> <?php echo $allrows[$start_counter + $i][2];
use yii\bootstrap\Modal; use yii\widgets\Pjax; use yii\helpers\Json; use kartik\tabs\TabsX; use lukisongroup\assets\AppAssetOrg1; AppAssetOrg1::register($this); /*ORG JSON INCRIPTION -ptr.nov-*/ function encodeURIComponent($str) { $revert = array('%21' => '!', '%2A' => '*', '%27' => "'", '%28' => '(', '%29' => ')'); return strtr(rawurlencode($str), $revert); } /*ORG JSON DATA INCRIPTION -ptr.nov-*/ //print_r($dataProviderOrg->getModels()); //echo \yii\helpers\Json::encode($dataProvider->getModels()); $orgJsonStr = encodeURIComponent(Json::encode($dataProviderOrg->getModels())); //$itemJsonStr2 = Json::encode($dataProviderOrg->getModels()); $diagramOrg = '<div class="body-content" id="orgdiagram-administation" style="overflow: hidden;"></div>'; //$diagramOrg = '<div class="content-wrapper" id="orgdiagram-administation" style="position: absolute; overflow: hidden; left: 0px; padding: 0px; margin: 0px; border-style: solid; border-color: navy; border-width: 1px;"></div>'; $items = [['label' => '<i class="fa fa-sitemap fa-1x"></i> Struktur Organisasi', 'content' => $diagramOrg, 'active' => true], ['label' => '<i class="fa fa-soccer-ball-o fa-1x"></i> Visi Misi', 'content' => 'asdas'], ['label' => '<i class="fa fa-tags fa-1x"></i>Regulations', 'content' => 'asdasdsadasd']]; echo TabsX::widget(['id' => 'tab-org-administrator', 'items' => $items, 'position' => TabsX::POS_ABOVE, 'bordered' => true, 'encodeLabels' => false]); ?> <?php /* * Primitive JS Structure Organization * @author ptrnov [ptr.nov@gmail.com] * @since 1.1 */ $this->registerJs(' $.noConflict();
echo '"><a href="javascript:void(0);" modulename="'; echo $tabs[$i]; echo '">'; echo $tabNames[$i]; echo '</a></li>'; } ?> <li class="dropdown"> <a class="dropdown-toggle" data-toggle="dropdown" href="javascript:void(0);""> Social <span class="caret"></span> </a> <ul class="dropdown-menu" style="width:100%; margin-top:12px;"> <li><a href="https://www.twitter.com/googulator" target="_blank">Twitter</a></li> <li><a href="https://plus.google.com/communities/108343287295374695153" target="_blank">Google+ Community</a></li> <li><a href="https://www.pushbullet.com/channel?tag=<?php echo encodeURIComponent($PUSHBULLET_CHANNEL_ID); ?> " target="_blank">Pushbullet Channel</a></li> </ul> </li> </ul> <div id="googleUserInfo" style="padding-right:1em; position:absolute; right: 0px; top: 0px;bottom: 0px;"> <div id="loadText" style='margin-top:0.25em'>Loading Google Credentials...</div> <button id="loadButton" class="gPlusLoginButton hidden" style="margin-right: -1em;"> <span class="gPlusIcon"></span> <span class="verticalDivider"></span> <span class="text"> Sign In</span></button> </div> </div> </div>
$misconceptiontitle = encodeURIComponent($misconceptiontitle); $fm = fopen($_SERVER['DOCUMENT_ROOT'] . "/misconception/questions/" . $misconceptiontitle . ".txt", "wb"); fwrite($fm, '0' . "\n" . "\n" . "\n" . '0!n!~undefined~' . "\n" . date("M") . " " . date("j") . ',' . date("Y") . "\n" . date("M") . " " . date("j") . ',' . date("Y") . "!n!" . "\n" . '0' . "!n!" . "~undefined~" . "\n" . ',undefined,' . "\n" . $username . "\n" . $whatyouthinkyouknow . "!n!"); fclose($fm); $ratingval = 0; include '../config.php'; $con = new PDO('mysql:host=' . DB_HOST . ';dbname=' . DB_NAME . '', DB_USER, DB_PASSWORD); $tagsinstring = implode(',', $tagarray); $misconceptiontitle = decodeURIComponent($misconceptiontitle); $query = $con->prepare("INSERT INTO srating (title, rating, tags) VALUES (:title,:rating,:tags) "); //bind parameters $query->bindParam(':title', $misconceptiontitle); $query->bindParam(':rating', $ratingval); // for everytag that a thing has, give it an increased rating by one $query->bindParam(':tags', $tagsinstring); $query->execute(); //update user rep cause htey'd asked a question $uquery = $con->prepare("SELECT * FROM accounts where username = :questionowner"); $uquery->bindParam(':questionowner', $username); $uquery->execute(); $data = $uquery->fetch(PDO::FETCH_ASSOC); $newrep = $data['reputation']; $newrep = $newrep + 5; $stmt = $con->prepare("UPDATE accounts SET reputation=:newrep WHERE username=:questionowner"); $stmt->bindParam(':questionowner', $username); $stmt->bindParam(':newrep', $newrep); $stmt->execute(); $misconceptiontitle = encodeURIComponent($misconceptiontitle); echo "/misconception/questions/" . $misconceptiontitle . ".php"; //there's a bug where if php echos you must chose a dif title js thinks that it's a link nad send you to that place //header("Location: ../ask_misconception_page/ask-index.php");
$upperMark = $row["upperMark"]; if ($upperMark === '') { $search_output .= "<a href='checkTypeComments.php?assignment_ID={$assignment_ID}&student_ID={$student_ID}&id={$id}'>{$title}</a><br/>{$body}<br/>({$lowerMark})<br/><br/>"; } else { $search_output .= "<a href='checkTypeComments.php?assignment_ID={$assignment_ID}&student_ID={$student_ID}&id={$id}'>{$title}</a><br/>{$body}<br/>({$lowerMark} - {$upperMark})<br/><br/>"; } } echo $search_output; } /** * Matches JavaScript's encodeURIComponent behaviour * Courtesy: http://stackoverflow.com/questions/1734250/what-is-the-equivalent-of-javascripts-encodeuricomponent-in-php * * @param string $str input string * @return string */ function encodeURIComponent($str) { $revert = array('%21' => '!', '%2A' => '*', '%27' => "'", '%28' => '(', '%29' => ')'); return strtr(rawurlencode($str), $revert); } // echo "<a href='checkTypeComments.php?search_output=$search_output>Add This Comment'</a>"; echo "<a href='addIndividualComment.php?searchquery=" . encodeURIComponent($searchquery) . "'>ADD COMMENT</a><br/><br/>"; echo $searchquery; } // ------------------------------------end full text search--------------------------------------------------------------------. ?> </body> </html>
//print_r($orderedarray); $searchquerydata = array(); for ($querynumber = 0; $querynumber < count($orderedarray); $querynumber++) { $currentquery = $orderedarray[$querynumber]; for ($unorderedquery = 0; $unorderedquery < count($orderedarray); $unorderedquery++) { $individualparts = explode("~!~", $firstsearcharray[$unorderedquery]); if ($individualparts[0] == $currentquery) { $individualparts[1] = decodeURIComponent($individualparts[1]); $query = $con->prepare("SELECT * FROM srating WHERE title = :misconceptionname"); $query->bindParam(':misconceptionname', $individualparts[1]); $query->execute(); $data = $query->fetch(PDO::FETCH_ASSOC); $repofanswers = $data['repofanswers']; $views = $data['views']; $tags = $data['tags']; $individualparts[1] = encodeURIComponent($individualparts[1]); $lines = file("../questions/" . $individualparts[1] . ".txt"); // turn it back to spaces for client side $individualparts[1] = decodeURIComponent($individualparts[1]); $questionrep = $lines[0]; $whatithinkiknow = preg_split("/(!n!)/", $lines[9], -1, PREG_SPLIT_DELIM_CAPTURE); //$questionrep = data['questionrep']; $compiledinfo = $repofanswers . "~!~" . $views . "~!~" . $tags . "~!~" . $questionrep . "~!~" . $individualparts[1] . "~!~" . $whatithinkiknow[0]; $compiledinfo = str_replace("\n", "", $compiledinfo); array_push($searchquerydata, $compiledinfo); } } } echo json_encode(array_values($searchquerydata)); //push $current query into firstsearcharray //once we do that we look into the relavent titles (first search array) and see the number of accurances does our token show up
while ($arows = mysql_fetch_row($query)) { if ($section_id == '') { $section_id = $arows[0]; } ?> <div class="about-category <?php if ($arows[0] == $section_id) { echo "selected"; } ?> " onclick="gotoPage('full',500,'index/about.php?section_id=<?php echo $arows[0]; ?> ')"> <div class="text" ><a href="?cmode=full&command=<?php echo encodeURIComponent("index/about.php?section_id=" . $arows[0]); ?> " ><?php echo $arows[1]; ?> </a></div> </div> <?php } ?> </div> <div id="about-shadow"> </div> <div id="about-container"> <?php if ($isAdmin) {
function pnlink($clang, $lang, $mode, $id, $text, $db, $goback = '') { $blankLink = false; if ($clang != $lang) { $blankLink = true; } if ($mode == '1') { $subquery = mysql_query("SELECT category, sub_category FROM productbykk_" . $lang . " WHERE state = 1 AND id='{$id}' ;", $db); if ($subrow = mysql_fetch_row($subquery)) { if (!$blankLink) { echo "<a href='?cmode=full&command=" . encodeURIComponent("index/product.php?category=" . $subrow[0] . "&sub_category=" . $subrow[1] . "&ptoshow=" . $id) . "' "; echo " onclick=" . chr(34) . "gotoPage('full',500,'index/product.php?category=" . encodeURIComponent($subrow[0]) . "&sub_category=" . encodeURIComponent($subrow[1]) . "&ptoshow=" . $id . "');" . chr(34) . " >"; } else { echo "<a href='../" . $lang . "/?cmode=full&command=" . encodeURIComponent("index/product.php?category=" . $subrow[0] . "&sub_category=" . $subrow[1] . "&ptoshow=" . $id) . "' "; echo " class='download' target='_blank' >"; } if ($text == '') { echo "Product link"; } else { echo $text; } echo "</a>"; } } else { if ($mode == '2') { if (!$blankLink) { echo "<a href='?cmode=full&command=" . encodeURIComponent("index/news.php?ntoshow=" . $id) . "' "; echo " onclick=" . chr(34) . "gotoPage('full',500,'index/news.php?ntoshow=" . $id . "');" . chr(34) . " >"; } else { echo "<a href='../" . $lang . "/?cmode=full&command=" . encodeURIComponent("index/news.php?ntoshow=" . $id) . "' "; echo " class='download' target='_blank' >"; } if ($text == '') { echo "News link"; } else { echo $text; } echo "</a>"; } else { if ($mode == '3') { if (!$blankLink) { echo "<a href='?cmode=full&command=" . encodeURIComponent("index/gallery.php?gtoshow=" . $id) . "' "; echo " onclick=" . chr(34) . "gotoPage('full',500,'index/gallery.php?gtoshow=" . $id . "');" . chr(34) . " >"; } else { echo "<a href='../" . $lang . "/?cmode=full&command=" . encodeURIComponent("index/gallery.php?gtoshow=" . $id) . "' "; echo " class='download' target='_blank' >"; } if ($text == '') { echo "Gallery link"; } else { echo $text; } echo "</a>"; } else { if ($mode == '4') { echo "<a href='" . $id . "' class='download' target='_blank' >"; if ($text == '') { echo "Website link"; } else { echo $text; } echo "</a>"; } else { if ($mode == '5') { if (!$blankLink) { echo "<a href='?cmode=full&command=" . encodeURIComponent("index/fillform.php?goback=" . $goback . "&id=" . $id) . "' "; echo " onclick=" . chr(34) . "gotoPage('full',500,'index/fillform.php?goback=" . $goback . "&id=" . $id . "');" . chr(34) . " >"; } else { echo "<a href='../" . $lang . "/?cmode=full&command=" . encodeURIComponent("index/fillform.php?goback=" . $goback . "&id=" . $id) . "' "; echo " class='download' target='_blank' >"; } if ($text == '') { echo "Form link"; } else { echo $text; } echo "</a>"; } } } } } }
<?php if ($rows[5] != '') { ?> <div class="img" ><img src="<?php echo $rows[5]; ?> " onclick="showNews(<?php echo $rows[0]; ?> )" style="width: 100%;"></div> <?php } ?> <div class="n-text" > <h2 ><a href="?cmode=full&command=<?php echo encodeURIComponent("index/news.php?ntoshow=" . $rows[0]); ?> " onclick="showNews(<?php echo $rows[0]; ?> )"><?php echo $rows[2]; ?> </a></h2> <?php echo $rows[3]; ?> </div> </div> </div> <?php
echo $row[0]; ?> </a></span> <script> window.document.title= "<?php echo $sitetitle . " | " . $row[0]; ?> "; </script> <?php } else { visiting('form', $db); ?> <span class="pn-spacer" >></span> <span class="pn-item" ><a href="?cmode=full&command=<?php echo encodeURIComponent("index/fillform.php?id=" . $id); ?> " onclick="gotoPage('full',500,'index/fillform.php?id=<?php echo $id; ?> ');" ><?php echo $row[0]; ?> </a></span> <script> window.document.title= "<?php echo $sitetitle . " | " . $row[0]; ?> "; </script> <?php
</div> <div class="footer-link"> <a href="?cmode=full&command=<?php echo encodeURIComponent("index/gallery.php"); ?> " onclick="gotoPage('full',500,'index/gallery.php');" >Galerie</a> </div> <div class="footer-link"> <a href="?cmode=full&command=<?php echo encodeURIComponent("index/about.php"); ?> " onclick="gotoPage('full',500,'index/about.php');" >Über</a> </div> <div class="footer-link"> <a href="?cmode=full&command=<?php echo encodeURIComponent("index/contact.php"); ?> " onclick="gotoPage('full',500,'index/contact.php');" >Kontakt</a> </div> </div> <div style="height: 100px;width: 450px;float: right;margin-right: 20px;"> <?php $contact_address = "aboutandcontact/footer.dtx"; $check = false; $f = fopen($contact_address, "r"); if ($f === false) { echo $contact_address . " doesn't exist."; } else { while (!feof($f)) { $buf = fgets($f, 4096); $buf = htmlspecialchars_decode($buf, ENT_QUOTES);
/** * SCORM Data for Javascript-API */ function apiInitData() { global $ilias, $ilLog, $ilUser, $lng, $ilDB; function encodeURIComponent($str) { $revert = array('%21' => '!', '%2A' => '*', '%27' => "'", '%28' => '(', '%29' => ')', '%7E' => '~'); return strtr(rawurlencode($str), $revert); } if ($_GET["ref_id"] == "") { print 'alert("no start without ref_id");'; die; } $slm_obj =& new ilObjSCORMLearningModule($_GET["ref_id"]); header('Content-Type: text/javascript; charset=UTF-8'); print "function iliasApi() {\r\n"; $js_data = file_get_contents("./Modules/ScormAicc/scripts/basisAPI.js"); echo $js_data; $js_data = file_get_contents("./Modules/ScormAicc/scripts/SCORM1_2standard.js"); //want to give opportunities to different files (Uwe Kohnle) echo $js_data; print "}\r\n"; //variables to set in administration interface $b_storeObjectives = 'true'; $b_storeInteractions = 'true'; $b_readInteractions = 'false'; $c_storeSessionTime = 's'; //n=no, s=sco, i=ilias $i_lessonScoreMax = '-1'; $i_lessonMasteryScore = '-1'; //other variables $b_messageLog = 'false'; if ($ilLog->current_log_level == 30) { $b_messageLog = 'true'; } $launchId = '0'; if ($_GET["autolaunch"] != "") { $launchId = $_GET["autolaunch"]; } $session_timeout = 0; //unlimited sessions if ($slm_obj->getSession()) { $session_timeout = (int) $ilias->ini->readVariable("session", "expire") / 2; } $b_autoReview = 'false'; if ($this->slm->getAutoReview()) { $b_autoReview = 'true'; } $b_debug = 'false'; if ($this->slm->getDebug()) { $b_debug = 'true'; } $b_autoContinue = 'false'; if ($this->slm->getAutoContinue()) { $b_autoContinue = 'true'; } $b_checkSetValues = 'false'; if ($this->slm->getCheck_values()) { $b_checkSetValues = 'true'; } $b_autoLastVisited = 'false'; if ($this->slm->getAuto_last_visited()) { $b_autoLastVisited = 'true'; if ($launchId == '0') { $launchId = $slm_obj->getLastVisited($ilUser->getID()); } } $s_out = 'IliasScormVars={' . 'refId:' . $_GET["ref_id"] . ',' . 'objId:' . $this->slm->getId() . ',' . 'launchId:' . $launchId . ',' . 'launchNr:0,' . 'pingSession:' . $session_timeout . ',' . 'studentId:' . $ilias->account->getId() . ',' . 'studentName:"' . encodeURIComponent($ilias->account->getLastname() . ', ' . $ilias->account->getFirstname()) . '",' . 'studentLogin:"******",' . 'studentOu:"' . encodeURIComponent($ilias->account->getDepartment()) . '",' . 'credit:"' . str_replace("_", "-", $this->slm->getCreditMode()) . '",' . 'lesson_mode:"' . $this->slm->getDefaultLessonMode() . '",' . 'b_autoReview:' . $b_autoReview . ',' . 'b_messageLog:' . $b_messageLog . ',' . 'b_checkSetValues:' . $b_checkSetValues . ',' . 'b_storeObjectives:' . $b_storeObjectives . ',' . 'b_storeInteractions:' . $b_storeInteractions . ',' . 'b_readInteractions:' . $b_readInteractions . ',' . 'c_storeSessionTime:"' . $c_storeSessionTime . '",' . 'b_autoContinue:' . $b_autoContinue . ',' . 'b_autoLastVisited:' . $b_autoLastVisited . ',' . 'i_lessonScoreMax:' . $i_lessonScoreMax . ',' . 'i_lessonMasteryScore:' . $i_lessonMasteryScore . ',' . 'b_debug:' . $b_debug . ',' . 'dataDirectory:"' . encodeURIComponent($this->slm->getDataDirectory("output") . '/') . '",' . 'img:{' . 'asset:"' . encodeURIComponent(ilUtil::getImagePath('scorm/asset.png')) . '",' . 'browsed:"' . encodeURIComponent(ilUtil::getImagePath('scorm/browsed.png')) . '",' . 'completed:"' . encodeURIComponent(ilUtil::getImagePath('scorm/completed.png')) . '",' . 'failed:"' . encodeURIComponent(ilUtil::getImagePath('scorm/failed.png')) . '",' . 'incomplete:"' . encodeURIComponent(ilUtil::getImagePath('scorm/incomplete.png')) . '",' . 'not_attempted:"' . encodeURIComponent(ilUtil::getImagePath('scorm/not_attempted.png')) . '",' . 'passed:"' . encodeURIComponent(ilUtil::getImagePath('scorm/passed.png')) . '",' . 'running:"' . encodeURIComponent(ilUtil::getImagePath('scorm/running.png')) . '"' . '},' . 'statusTxt:{' . 'wait:"' . encodeURIComponent($lng->txt("please_wait")) . '",' . 'status:"' . encodeURIComponent($lng->txt("cont_status")) . '",' . 'browsed:"' . encodeURIComponent($lng->txt("cont_sc_stat_browsed")) . '",' . 'completed:"' . encodeURIComponent($lng->txt("cont_sc_stat_completed")) . '",' . 'failed:"' . encodeURIComponent($lng->txt("cont_sc_stat_failed")) . '",' . 'incomplete:"' . encodeURIComponent($lng->txt("cont_sc_stat_incomplete")) . '",' . 'not_attempted:"' . encodeURIComponent($lng->txt("cont_sc_stat_not_attempted")) . '",' . 'passed:"' . encodeURIComponent($lng->txt("cont_sc_stat_passed")) . '",' . 'running:"' . encodeURIComponent($lng->txt("cont_sc_stat_running")) . '"' . '}' . '};'; // header('Content-Type: text/javascript; charset=UTF-8'); print $s_out . "\r\n"; //prevdata $s_out = 'IliasScormData=['; $tquery = 'SELECT sco_id,lvalue,rvalue FROM scorm_tracking ' . 'WHERE user_id = %s AND obj_id = %s ' . "AND sco_id > 0 AND lvalue != 'cmi.core.entry' AND lvalue != 'cmi.core.session_time'"; if ($b_readInteractions == 'false') { $tquery .= " AND SUBSTR(lvalue, 1, 16) != 'cmi.interactions'"; } $val_set = $ilDB->queryF($tquery, array('integer', 'integer'), array($ilUser->getId(), $this->slm->getId())); while ($val_rec = $ilDB->fetchAssoc($val_set)) { if (!strpos($val_rec["lvalue"], "._count")) { $s_out .= '[' . $val_rec["sco_id"] . ',"' . $val_rec["lvalue"] . '","' . encodeURIComponent($val_rec["rvalue"]) . '"],'; } } //manifestData $val_set = $ilDB->queryF(' SELECT sc_item.obj_id,maxtimeallowed,timelimitaction,datafromlms,masteryscore FROM sc_item, scorm_object WHERE scorm_object.obj_id=sc_item.obj_id AND scorm_object.c_type = %s AND scorm_object.slm_id = %s', array('text', 'integer'), array('sit', $this->slm->getId())); while ($val_rec = $ilDB->fetchAssoc($val_set)) { if ($val_rec["maxtimeallowed"] != null) { $s_out .= '[' . $val_rec["obj_id"] . ',"cmi.student_data.max_time_allowed","' . encodeURIComponent($val_rec["maxtimeallowed"]) . '"],'; } if ($val_rec["timelimitaction"] != null) { $s_out .= '[' . $val_rec["obj_id"] . ',"cmi.student_data.time_limit_action","' . encodeURIComponent($val_rec["timelimitaction"]) . '"],'; } if ($val_rec["datafromlms"] != null) { $s_out .= '[' . $val_rec["obj_id"] . ',"cmi.launch_data","' . encodeURIComponent($val_rec["datafromlms"]) . '"],'; } if ($val_rec["masteryscore"] != null) { $s_out .= '[' . $val_rec["obj_id"] . ',"cmi.student_data.mastery_score","' . encodeURIComponent($val_rec["masteryscore"]) . '"],'; } } if (substr($s_out, strlen($s_out) - 1) == ",") { $s_out = substr($s_out, 0, strlen($s_out) - 1); } $s_out .= '];'; print $s_out . "\r\n"; //URLs $s_out = 'IliasScormResources=['; $s_resourceIds = ""; //necessary if resources exist having different href with same identifier $val_set = $ilDB->queryF("\n\t\t\tSELECT sc_resource.obj_id\n\t\t\tFROM scorm_tree, sc_resource\n\t\t\tWHERE scorm_tree.slm_id=%s \n\t\t\tAND sc_resource.obj_id=scorm_tree.child", array('integer'), array($this->slm->getId())); while ($val_rec = $ilDB->fetchAssoc($val_set)) { $s_resourceIds .= "," . $val_rec["obj_id"]; } $s_resourceIds = substr($s_resourceIds, 1); $tquery = "SELECT scorm_tree.lft, scorm_tree.child, \n\t\t\tCASE WHEN sc_resource.scormtype = 'asset' THEN 1 ELSE 0 END AS asset,\n\t\t\tsc_resource.href\n\t\t\tFROM scorm_tree, sc_resource, sc_item\n\t\t\tWHERE scorm_tree.slm_id=%s \n\t\t\tAND sc_item.obj_id=scorm_tree.child \n\t\t\tAND sc_resource.import_id=sc_item.identifierref \n\t\t\tAND sc_resource.obj_id in (" . $s_resourceIds . ") \n\t\t\tORDER BY scorm_tree.lft"; $val_set = $ilDB->queryF($tquery, array('integer'), array($this->slm->getId())); while ($val_rec = $ilDB->fetchAssoc($val_set)) { $s_out .= '[' . $val_rec["lft"] . ',' . $val_rec["child"] . ',' . $val_rec["asset"] . ',"' . encodeURIComponent($val_rec["href"]) . '"],'; } if (substr($s_out, strlen($s_out) - 1) == ",") { $s_out = substr($s_out, 0, strlen($s_out) - 1); } $s_out .= "];\r\n"; // set alternative API name if ($this->slm->getAPIAdapterName() != "API") { $s_out .= 'var ' . $this->slm->getAPIAdapterName() . '=new iliasApi();'; } else { $s_out .= 'var API=new iliasApi();'; } print $s_out; }
$("#uchange-pass").click(function(){ $("#uchange-pass-container").css({'display':'block'}).animate({'opacity':'1'},300); $("#uchange-pass").css({'display':'none'}); $("#uchange-password").val("1"); }); setTimeout(function () { $("#ucountry option").filter(function(index) { return encodeURIComponent($(this).val()) === '<?php echo encodeURIComponent($mrow[5]); ?> '; }).prop('selected', true); setTimeout(function () { checkUCountry(); $("#ucountry").trigger('click'); setTimeout(function () { $("#uiran_state option").filter(function(index) { return encodeURIComponent($(this).val()) === '<?php echo encodeURIComponent($mrow[6]); ?> '; }).prop('selected', true); $("#uiran_state").trigger('click'); },10); },100); },10); </script> <?php } ?> </div> <?php } else { ?> <script type="text/javascript">
} } // create hash and group all children by parentid $items = array(); while ($record = mysql_fetch_array($response)) { $account = new Account(); $account->load($record); array_push($items, $account); } function encodeURIComponent($str) { $revert = array('%21' => '!', '%2A' => '*', '%27' => "'", '%28' => '(', '%29' => ')'); return strtr(rawurlencode($str), $revert); } // serialize $rootAccount object including all its children into JSON string $jsonstring = encodeURIComponent(json_encode($items)); ?> <!DOCTYPE html> <html> <head> <title>jQuery Widget Hierarchical Chart PHP Demo</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" href="demo/js/jquery/ui-lightness/jquery-ui-1.10.2.custom.css" /> <script type="text/javascript" src="demo/js/jquery/jquery-1.9.1.js"></script> <script type="text/javascript" src="demo/js/jquery/jquery-ui-1.10.2.custom.js"></script> <script type="text/javascript" src="demo/js/json3.min.js"></script> <!-- jQuery UI Layout --> <script type="text/javascript" src="demo/jquerylayout/jquery.layout-latest.min.js"></script> <link rel="stylesheet" type="text/css" href="demo/jquerylayout/layout-default-latest.css" />