echo site_url('images/testimonials/yawara1000.jpg');
?>
" />
				<div u=caption t="Fade" t2="ZoomOut" class="slider-testimonial-p" d="800" style="position: absolute; left:0px; top: 450px; width:1500px; height:875px;">
					Since the new website was created business is really busy due to people looking on the website and finding out about the clubs. In the past I've relied mainly on paper flyers for promotion, but the new website gives me a great new marketing channel.
				</div>
				<div u=caption t="Fade" class="slider-author-p" style="position: absolute; left:500px; top: 1350px; width:1500px; height:100px;">
					Sensei Dave Clarke, Yawara Martial Arts
				</div>
			</div>
		</div>
	</div>
	<!-- Trigger -->
	<script>jssor_slider1_starter('slider2_container');</script>
	<?php 
if (detect_ie()) {
    ?>
		<script>$("#slider2_container").attr('class', 'hidden-xs hidden-sm hidden-md hidden-lg');</script>
	<?php 
}
?>

	<script>
	// Listen for orientation changes
	window.addEventListener("orientationchange", function() {
		if(window.innerHeight > window.innerWidth){
	//		window.location.replace("<?php 
echo site_url('/home-p/');
?>
");
			$("#slider1_container").attr('class', 'hidden-xs hidden-sm hidden-md hidden-lg');
Example #2
0
function mdnw_register_scripts()
{
    if (!is_admin()) {
        function detect_ie($ie7_check = true, $ie8_check = true)
        {
            $ie7 = $ie7_check == true ? strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE 7.0') : false;
            $ie8 = $ie8_check == true ? strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE 8.0') : false;
            if ($ie7 !== false || $ie8 !== false) {
                return true;
            } else {
                return false;
            }
        }
        wp_enqueue_script('jquery');
        // Sortable Masonry
        wp_register_script('Isotope', WP_THEME_URL . '/assets/javascripts/isotope/jquery.isotope.js', false, null, true);
        wp_enqueue_script('Isotope');
        wp_register_script('Modernizer', WP_THEME_URL . '/assets/javascripts/isotope/modernizr.custom.69142.js', false, null, true);
        wp_enqueue_script('Modernizer');
        //Dropdown Menu
        wp_register_script('HoverIntent', WP_THEME_URL . '/assets/javascripts/superfish/jquery.hoverIntent.js', false, null, true);
        wp_enqueue_script('HoverIntent');
        wp_register_script('Superfish', WP_THEME_URL . '/assets/javascripts/superfish/superfish.js', false, null, true);
        wp_enqueue_script('Superfish');
        wp_register_script('SuperSubs', WP_THEME_URL . '/assets/javascripts/superfish/supersubs.js', false, null, true);
        wp_enqueue_script('SuperSubs');
        //Responsive Menu
        wp_register_script('Modernizer2', WP_THEME_URL . '/assets/javascripts/mobilemenu/js/modernizr.custom.js', false, null, true);
        wp_enqueue_script('Modernizer2');
        wp_register_script('ResponsiveMenu', WP_THEME_URL . '/assets/javascripts/mobilemenu/js/jquery.dlmenu.js', false, null, true);
        if (detect_ie()) {
        } else {
            wp_enqueue_script('ResponsiveMenu');
        }
        // Pre-Script Action
        wp_register_script('SkeletonKeyPreScripts', WP_THEME_URL . '/assets/javascripts/skeleton-key-prescripts.js', false, null, false);
        wp_enqueue_script('SkeletonKeyPreScripts');
        // The Activation Scripts
        wp_register_script('SkeletonKey', WP_THEME_URL . '/assets/javascripts/skeleton-key.js', false, null, true);
        wp_enqueue_script('SkeletonKey');
    }
}
Example #3
0
function do_array($ia)
{
    global $thissurvey;
    $abstract_measure = false;
    $aLastMoveResult = LimeExpressionManager::GetLastMoveResult(true);
    $aMandatoryViolationSubQ = $aLastMoveResult['mandViolation'] && $ia[6] == 'Y' ? explode("|", $aLastMoveResult['unansweredSQs']) : array();
    $repeatheadings = Yii::app()->getConfig("repeatheadings");
    $minrepeatheadings = Yii::app()->getConfig("minrepeatheadings");
    $extraclass = "";
    $clang = Yii::app()->lang;
    $caption = "";
    // Just leave empty, are replaced after
    $checkconditionFunction = "checkconditions";
    $qquery = "SELECT other FROM {{questions}} WHERE qid={$ia[0]} AND language='" . $_SESSION['survey_' . Yii::app()->getConfig('surveyID')]['s_lang'] . "'";
    $other = Yii::app()->db->createCommand($qquery)->queryScalar();
    //Checked
    $aQuestionAttributes = getQuestionAttributeValues($ia[0], $ia[4]);
    if (trim($aQuestionAttributes['answer_width']) != '') {
        $answerwidth = $aQuestionAttributes['answer_width'];
    } else {
        $answerwidth = "20%";
    }
    $columnswidth = 100 - $answerwidth;
    if ($aQuestionAttributes['use_dropdown'] == 1) {
        $useDropdownLayout = true;
        $extraclass .= " dropdown-list";
        $caption = $clang->gT("An array with sub-question on each line. You have to select your answer.");
    } else {
        $useDropdownLayout = false;
        $caption = $clang->gT("An array with sub-question on each line. The answers are contained in the table header. ");
    }
    if (ctype_digit(trim($aQuestionAttributes['repeat_headings'])) && trim($aQuestionAttributes['repeat_headings'] != "")) {
        $repeatheadings = intval($aQuestionAttributes['repeat_headings']);
        $minrepeatheadings = 0;
    }
    $lresult = Answer::model()->findAll(array('order' => 'sortorder, code', 'condition' => 'qid=:qid AND language=:language AND scale_id=0', 'params' => array(':qid' => $ia[0], ':language' => $_SESSION['survey_' . Yii::app()->getConfig('surveyID')]['s_lang'])));
    $labelans = array();
    $labelcode = array();
    foreach ($lresult as $lrow) {
        $labelans[] = $lrow->answer;
        $labelcode[] = $lrow->code;
    }
    if ($useDropdownLayout === false && count($lresult) > 0) {
        $sQuery = "SELECT count(qid) FROM {{questions}} WHERE parent_qid={$ia[0]} AND question like '%|%' ";
        $iCount = Yii::app()->db->createCommand($sQuery)->queryScalar();
        if ($iCount > 0) {
            $right_exists = true;
            $answerwidth = $answerwidth / 2;
        } else {
            $right_exists = false;
        }
        // $right_exists is a flag to find out if there are any right hand answer parts. If there arent we can leave out the right td column
        if ($aQuestionAttributes['random_order'] == 1) {
            $ansquery = "SELECT * FROM {{questions}} WHERE parent_qid={$ia[0]} AND language='" . $_SESSION['survey_' . Yii::app()->getConfig('surveyID')]['s_lang'] . "' ORDER BY " . dbRandom();
        } else {
            $ansquery = "SELECT * FROM {{questions}} WHERE parent_qid={$ia[0]} AND language='" . $_SESSION['survey_' . Yii::app()->getConfig('surveyID')]['s_lang'] . "' ORDER BY question_order";
        }
        $ansresult = dbExecuteAssoc($ansquery);
        //Checked
        $aQuestions = $ansresult->readAll();
        $anscount = count($aQuestions);
        $fn = 1;
        $numrows = count($labelans);
        if ($right_exists) {
            ++$numrows;
            $caption .= $clang->gT("After answers, a cell give some information. ");
        }
        if ($ia[6] != 'Y' && SHOW_NO_ANSWER == 1) {
            ++$numrows;
            $caption .= $clang->gT("The last cell are for no answer. ");
        }
        // the number is the the number of choices, 1-7, in a LIKERT scale
        define("LIKERT", 7);
        // if the question code matches one of these, Abstract Measure logic will override most other logic
        define("RI_MEASURE", 'RIMEASURE');
        define("RO_MEASURE", 'ROMEASURE');
        $image_url = '/upload/images/true_scale.png';
        $show_likert = false;
        $show_importantance = false;
        $extra_styling = "";
        if ($numrows == LIKERT) {
            $show_likert = true;
            if (detect_ie()) {
                $extra_styling = "style='width:250px; margin-left: -10px;'";
            } else {
                $extra_styling = "style='width:258px; margin-left: -8px;'";
            }
            $right_exists = true;
            $answerwidth = "72";
            // in pixels
            $importance_question_groups = array('IMPORTIDEAL', 'IMPORTIDEAL2', 'IMPORTOUGHT', 'IM01', 'IM02');
            if (in_array($ia[2], $importance_question_groups)) {
                $image_url = '/upload/images/importance_ideal_ought/trues.png';
                $right_exists = false;
                $show_importantance = true;
            }
        }
        if (startsWith($ia[2], RI_MEASURE) || startsWith($ia[2], RO_MEASURE)) {
            $abstract_measure = true;
            $show_likert = false;
            $right_exists = false;
        }
        $rightwidth = " width='81px'";
        if (detect_ie()) {
            $rightwidth = " width='84px'";
        }
        $cellwidth = round($columnswidth / $numrows, 1) . "%";
        if ($show_likert) {
            $cellwidth = "30";
            if ($show_importantance) {
                $cellwidth = "37";
            }
        }
        if ($abstract_measure) {
            $extraclass = 'abstract-measure';
        }
        $answer_start = "\n<table class=\"question subquestions-list questions-list {$extraclass}\" summary=\"{$caption}\">\n";
        $answer_head_line = "\t<td>&nbsp;</td>\n";
        foreach ($labelans as $ld) {
            $answer_head_line .= "\t<th>" . $ld . "</th>\n";
        }
        if ($right_exists) {
            $answer_head_line .= "\t<td>&nbsp;</td>\n";
        }
        if ($ia[6] != 'Y' && SHOW_NO_ANSWER == 1) {
            $answer_head_line .= "\t<th>" . $clang->gT('No answer') . "</th>\n";
        }
        if ($show_likert) {
            $answer_head_line = "\t\t\t<td align='right' colspan='9'><img src='" . $image_url . "'></td>\n";
        }
        $answer_head = "\t<thead><tr>\n" . $answer_head_line . "</tr></thead>\n\t\n";
        if ($abstract_measure) {
            $answer_head = '';
        }
        $answer = '<tbody>';
        $trbc = '';
        $inputnames = array();
        foreach ($aQuestions as $ansrow) {
            if (isset($repeatheadings) && $repeatheadings > 0 && $fn - 1 > 0 && ($fn - 1) % $repeatheadings == 0) {
                if ($anscount - $fn + 1 >= $minrepeatheadings) {
                    $answer .= "</tbody>\n<tbody>";
                    // Close actual body and open another one
                    $answer .= "<tr class=\"dontread repeat headings\">{$answer_head_line}</tr>";
                }
            }
            $myfname = $ia[1] . $ansrow['title'];
            $answertext = $ansrow['question'];
            $answertextsave = $answertext;
            if (strpos($answertext, '|')) {
                $answertext = substr($answertext, 0, strpos($answertext, '|'));
            }
            if (strpos($answertext, '|')) {
                $answerwidth = $answerwidth / 2;
            }
            /* Check the mandatory sub Q violation */
            if (in_array($myfname, $aMandatoryViolationSubQ)) {
                $answertext = '<span class="errormandatory">' . $answertext . '</span>';
            }
            // Get array_filter stuff
            //
            // TMSW - is this correct?
            $trbc = alternation($trbc, 'row');
            if ($abstract_measure) {
                $trbc = 'array1';
            }
            list($htmltbody2, $hiddenfield) = return_array_filter_strings($ia, $aQuestionAttributes, $thissurvey, $ansrow, $myfname, $trbc, $myfname, "tr", "{$trbc} answers-list radio-list");
            $fn++;
            $answer .= $htmltbody2;
            if (!$abstract_measure) {
                $answer .= "\t<th class=\"answertext\">\n{$answertext}" . $hiddenfield . "<input type=\"hidden\" name=\"java{$myfname}\" id=\"java{$myfname}\" value=\"";
                if (isset($_SESSION['survey_' . Yii::app()->getConfig('surveyID')][$myfname])) {
                    $answer .= $_SESSION['survey_' . Yii::app()->getConfig('surveyID')][$myfname];
                }
                $answer .= "\" />\n\t</th>\n";
            }
            $thiskey = 0;
            foreach ($labelcode as $ld) {
                $likertlabel = "";
                $likert_width = "";
                $abstract_class = "";
                if ($show_likert) {
                    $likertlabel = "<div style='font-size:13px; padding: 4px 0 4px 0;'>{$ld}</div>";
                    $likert_width = "15";
                }
                if ($abstract_measure) {
                    // images for abstract measures
                    $a_measures[] = "0.gif";
                    $a_measures[] = "16.gif";
                    $a_measures[] = "33.gif";
                    $a_measures[] = "50.gif";
                    $a_measures[] = "66.gif";
                    $a_measures[] = "83.gif";
                    $a_measures[] = "100.gif";
                    $likertlabel = "<img src='/upload/images/abstract_measures/" . $a_measures[$thiskey] . "'>";
                    $abstract_class = 'abstract-answers';
                }
                $answer .= "\t\t\t<td class=\"answer_cell_00{$ld} answer-item radio-item {$abstract_class}\" width=\"{$likert_width}\">{$likertlabel}\n" . "<label class=\"hide read\" for=\"answer{$myfname}-{$ld}\">{$labelans[$thiskey]}</label>\n" . "\t<input class=\"radio\" type=\"radio\" name=\"{$myfname}\" value=\"{$ld}\" id=\"answer{$myfname}-{$ld}\" title=\"" . HTMLEscape(strip_tags($labelans[$thiskey])) . '"';
                if (isset($_SESSION['survey_' . Yii::app()->getConfig('surveyID')][$myfname]) && $_SESSION['survey_' . Yii::app()->getConfig('surveyID')][$myfname] == $ld) {
                    $answer .= CHECKED;
                }
                // --> START NEW FEATURE - SAVE
                $answer .= " onclick=\"{$checkconditionFunction}(this.value, this.name, this.type)\" />\n" . "\t</td>\n";
                // --> END NEW FEATURE - SAVE
                $thiskey++;
            }
            if (strpos($answertextsave, '|')) {
                $answertext = substr($answertextsave, strpos($answertextsave, '|') + 1);
                $answer .= "\t<th class=\"answertextright\">{$answertext}</th>\n";
            } elseif ($right_exists) {
                $answer .= "\t<td class=\"answertextright\"" . $rightwidth . ">&nbsp;</td>\n";
            }
            if ($ia[6] != 'Y' && SHOW_NO_ANSWER == 1) {
                $answer .= "\t<td class=\"answer-item radio-item noanswer-item\">\n" . "<label class=\"hide read\" for=\"answer{$myfname}-\">" . $clang->gT('No answer') . "</label>\n" . "\t<input class=\"radio\" type=\"radio\" name=\"{$myfname}\" value=\"\" id=\"answer{$myfname}-\" ";
                if (!isset($_SESSION['survey_' . Yii::app()->getConfig('surveyID')][$myfname]) || $_SESSION['survey_' . Yii::app()->getConfig('surveyID')][$myfname] == '') {
                    $answer .= CHECKED;
                }
                // --> START NEW FEATURE - SAVE
                $answer .= " onclick=\"{$checkconditionFunction}(this.value, this.name, this.type)\"  />\n\t</td>\n";
                // --> END NEW FEATURE - SAVE
            }
            $answer .= "</tr>\n";
            $inputnames[] = $myfname;
            //IF a MULTIPLE of flexi-redisplay figure, repeat the headings
        }
        $answer .= "</tbody>\n";
        $answer_cols = "\t<colgroup class=\"col-responses\">\n" . "\t<col class=\"col-answers\" width=\"{$answerwidth}%\" />\n";
        if ($show_likert) {
            $answer_cols = "\t<colgroup class=\"col-responses\">\n" . "\t<col class=\"col-answers\" width=\"274\" />\n";
        }
        if ($abstract_measure) {
            $answer_cols = "";
        }
        $odd_even = '';
        foreach ($labelans as $c) {
            $odd_even = alternation($odd_even);
            $answer_cols .= "<col class=\"{$odd_even}\" width=\"{$cellwidth}\" />\n";
        }
        if ($right_exists) {
            $odd_even = alternation($odd_even);
            $answer_cols .= "<col class=\"answertextright {$odd_even}\" width=\"{$answerwidth}\" />\n";
        }
        if ($ia[6] != 'Y' && SHOW_NO_ANSWER == 1) {
            $odd_even = alternation($odd_even);
            $answer_cols .= "<col class=\"col-no-answer {$odd_even}\" width=\"{$cellwidth}\" />\n";
        }
        $answer_cols .= "\t</colgroup>\n";
        $answer = $answer_start . $answer_cols . $answer_head . $answer . "</table>\n";
        if ($abstract_measure) {
            $answer .= "<tr><td colspan='8'><img src='/upload/images/abstract_measures/base.png' class='abstract-scale'></td></tr></table>\n";
        }
    } elseif ($useDropdownLayout === true && count($lresult) > 0) {
        foreach ($lresult as $lrow) {
            $labels[] = array('code' => $lrow->code, 'answer' => $lrow->answer);
        }
        $sQuery = "SELECT count(question) FROM {{questions}} WHERE parent_qid={$ia[0]} AND question like '%|%' ";
        $iCount = Yii::app()->db->createCommand($sQuery)->queryScalar();
        if ($iCount > 0) {
            $right_exists = true;
            $answerwidth = $answerwidth / 2;
        } else {
            $right_exists = false;
        }
        // $right_exists is a flag to find out if there are any right hand answer parts. If there arent we can leave out the right td column
        if ($aQuestionAttributes['random_order'] == 1) {
            $ansquery = "SELECT * FROM {{questions}} WHERE parent_qid={$ia[0]} AND language='" . $_SESSION['survey_' . Yii::app()->getConfig('surveyID')]['s_lang'] . "' ORDER BY " . dbRandom();
        } else {
            $ansquery = "SELECT * FROM {{questions}} WHERE parent_qid={$ia[0]} AND language='" . $_SESSION['survey_' . Yii::app()->getConfig('surveyID')]['s_lang'] . "' ORDER BY question_order";
        }
        $ansresult = dbExecuteAssoc($ansquery);
        //Checked
        $aQuestions = $ansresult->readAll();
        $anscount = count($aQuestions);
        $fn = 1;
        $numrows = count($labels);
        if ($ia[6] != 'Y' && SHOW_NO_ANSWER == 1) {
            ++$numrows;
        }
        if ($right_exists) {
            ++$numrows;
        }
        $cellwidth = round($columnswidth / $numrows, 1);
        $answer_start = "\n<table class=\"question subquestions-list questions-list {$extraclass}\" summary=\"" . str_replace('"', '', strip_tags($ia[3])) . " - an array type question\" >\n";
        $answer = "\t<tbody>\n";
        $trbc = '';
        $inputnames = array();
        foreach ($aQuestions as $ansrow) {
            $myfname = $ia[1] . $ansrow['title'];
            $trbc = alternation($trbc, 'row');
            $answertext = $ansrow['question'];
            $answertextsave = $answertext;
            if (strpos($answertext, '|')) {
                $answertext = substr($answertext, 0, strpos($answertext, '|'));
            }
            if (strpos($answertext, '|')) {
                $answerwidth = $answerwidth / 2;
            }
            if ($ia[6] == 'Y' && in_array($myfname, $aMandatoryViolationSubQ)) {
                $answertext = '<span class="errormandatory">' . $answertext . '</span>';
            }
            // Get array_filter stuff
            list($htmltbody2, $hiddenfield) = return_array_filter_strings($ia, $aQuestionAttributes, $thissurvey, $ansrow, $myfname, $trbc, $myfname, "tr", "{$trbc} question-item answer-item dropdown-item");
            $answer .= $htmltbody2;
            $answer .= "\t<th class=\"answertext\">\n{$answertext}" . $hiddenfield . "<input type=\"hidden\" name=\"java{$myfname}\" id=\"java{$myfname}\" value=\"";
            if (isset($_SESSION['survey_' . Yii::app()->getConfig('surveyID')][$myfname])) {
                $answer .= $_SESSION['survey_' . Yii::app()->getConfig('surveyID')][$myfname];
            }
            $answer .= "\" />\n\t</th>\n";
            $answer .= "\t<td >\n" . "<select name=\"{$myfname}\" id=\"answer{$myfname}\" onchange=\"{$checkconditionFunction}(this.value, this.name, this.type);\">\n";
            // Dropdown representation is en exception - even if mandatory or  SHOW_NO_ANSWER is disable a neutral option needs to be shown where the mandatory case asks actively
            if ($ia[6] != 'Y' && SHOW_NO_ANSWER == 1) {
                $sOptionText = $clang->gT('No answer');
            } else {
                $sOptionText = $clang->gT('Please choose...');
            }
            $answer .= "\t<option value=\"\" ";
            if (!isset($_SESSION['survey_' . Yii::app()->getConfig('surveyID')][$myfname]) || $_SESSION['survey_' . Yii::app()->getConfig('surveyID')][$myfname] == '') {
                $answer .= SELECTED;
            }
            $answer .= '>' . $sOptionText . "</option>\n";
            foreach ($labels as $lrow) {
                $answer .= "\t<option value=\"" . $lrow['code'] . '" ';
                if (isset($_SESSION['survey_' . Yii::app()->getConfig('surveyID')][$myfname]) && $_SESSION['survey_' . Yii::app()->getConfig('surveyID')][$myfname] == $lrow['code']) {
                    $answer .= SELECTED;
                }
                $answer .= '>' . flattenText($lrow['answer']) . "</option>\n";
            }
            $answer .= "</select>\n";
            if (strpos($answertextsave, '|')) {
                $answertext = substr($answertextsave, strpos($answertextsave, '|') + 1);
                $answer .= "\t<th class=\"answertextright\">{$answertext}</th>\n";
            } elseif ($right_exists) {
                $answer .= "\t<td class=\"answertextright\">&nbsp;</td>\n";
            }
            $answer .= "</tr>\n";
            $inputnames[] = $myfname;
            //IF a MULTIPLE of flexi-redisplay figure, repeat the headings
            $fn++;
        }
        $answer .= "\t</tbody>";
        $answer = $answer_start . $answer . "\n</table>\n";
    } else {
        $answer = "\n<p class=\"error\">" . $clang->gT("Error: There are no answer options for this question and/or they don't exist in this language.") . "</p>\n";
        $inputnames = '';
    }
    return array($answer, $inputnames);
}
Example #4
0
        $foaf = 'http';
    }
    $foaf = $foaf . '://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
    if ($q = @file_get_contents('php://input')) {
        $ret = $wiki->go($webid, $foaf);
        if (file_exists($ret)) {
            $rdf = file_get_contents($ret);
            if (strcmp($rdf, '') != 0) {
                //rdfLog('sparul', $username, $webid, $q, $rdf);
                $sql = " update foaf set rdf = '{$rdf}' , rdf2 = '{$rdf}' where username like '{$username}'  ";
                $res = dbinsertquery($sql);
            }
        }
    }
} else {
    if (detect_ie() or detect_safari()) {
        header('Content-Type: application/xml');
    } else {
        header('Content-Type: application/rdf+xml');
    }
    header('MS-Author-Via: SPARQL');
    $xsl = 'foaf.xsl';
    if ($_SERVER['HTTPS'] == 'on') {
        $xsl = 'foaf_secure.xsl';
    }
    if ($auth['isAuthenticated'] == 1) {
        $xsl = 'foaf_self.xsl';
    }
    //if ($authentication_level == 'client_certificate_rsakey_matches_foaf_friend_rsakey') $xsl = 'foaf_friend.xsl';
    // overrides
    /*