$config->metaDescription = smartTitle() . ' - ' . $config->metaDescription; # SQL statement - PREFIX is optional way to distinguish your app //END CONFIG AREA ---------------------------------------------------------- get_header(); #defaults to header_inc.php ?> <h3 align="center"><?php echo $config->titleTag; ?> </h3> <?php $mySurvey = new survey(1); if ($mySurvey->isValid) { echo 'The survey title is: ' . $mySurvey->Title . '<br/>'; echo 'The survey description is: ' . $mySurvey->Title . '<br/>'; dumpDie($mySurvey); } else { echo 'Sorry, no such survey'; } //echo $mySurvey->Title; get_footer(); #defaults to footer_inc.php /** * Survey class, holds survey data * * More stuff about the class * *<code> *code sample goes here; *</code> *
function showName() { #form submits here we show entered name dumpDie($_POST); get_header(); #defaults to footer_inc.php if (!isset($_POST['YourName']) || $_POST['YourName'] == '') { //data must be sent feedback("No form data submitted"); #will feedback to submitting page via session variable myRedirect(THIS_PAGE); } if (!ctype_alnum($_POST['YourName'])) { //data must be alphanumeric only feedback("Only letters and numbers are allowed. Please re-enter your name."); #will feedback to submitting page via session variable myRedirect(THIS_PAGE); } $myName = strip_tags($_POST['YourName']); # here's where we can strip out unwanted data echo '<h3 align="center">' . smartTitle() . '</h3>'; echo '<p align="center">Your name is <b>' . $myName . '</b>!</p>'; echo '<p align="center"><a href="' . THIS_PAGE . '">RESET</a></p>'; get_footer(); #defaults to footer_inc.php }
<?php $i = 0; //left column $j = 1; //right column foreach ($result->_embedded->entries as $entry) { $topicID = $_GET['topicID']; //var_dump($result->_embedded->entries); //var_dump($result->_embedded->entries[$i]->_links->topic->href); //== "/api/v2/topics/" . $topicID); //echo createRowSupport($i,$j,$entry); //$i+= $i; //&& $result->_embedded->entries[$i]->topic->href == "/api/v2/topics/".$topicID if (isset($result->_embedded->entries[$i]) && isset($result->_embedded->entries[$j]) && $result->_embedded->entries[$i]->_links->topic->href == "/api/v2/topics/" . $topicID) { $topicID2 = $result->_embedded->entries[$j]->id; createRowEntry($topicID, $topicID2, $result, $i, $j); dumpDie($result->_embedded->entries[$i]); } elseif (isset($result->_embedded->entries[$i]) && $result->_embedded->entries[$i]->_links->topic->href == "/api/v2/topics/" . $topicID) { echo ' <div class="row"> <div class="col-sm-6"> <div class="panel panel-default"> <div class="panel-body"> <div class="col-sm-4"><i class="fa fa-question-circle fa-5x text-center green"></i></div> <!--/4--> <div class="col-sm-8"> <h4><a href="support-articles.php?topicID=' . $topicID . '"> ' . $result->_embedded->entries[$i]->subject . ' </a></h4> <p>Find answers to your questions</p> </div> <!--/8--> </div>