• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP stripJavaScript函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中stripJavaScript函数的典型用法代码示例。如果您正苦于以下问题:PHP stripJavaScript函数的具体用法?PHP stripJavaScript怎么用?PHP stripJavaScript使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了stripJavaScript函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: editdata


//.........这里部分代码省略.........
                $results1['id'] = "";
                $results1['datestamp'] = dateShift(date("Y-m-d H:i:s"), "Y-m-d H:i:s", Yii::app()->getConfig('timeadjust'));
                $results1['ipaddr'] = $saver['ip'];
                $results[] = $results1;
            }
            $aData = array('id' => $id, 'surveyid' => $surveyid, 'subaction' => $subaction, 'part' => 'header');
            $aViewUrls[] = 'dataentry_header_view';
            $aViewUrls[] = 'edit';
            $highlight = FALSE;
            unset($fnames['lastpage']);
            // unset timings
            foreach ($fnames as $fname) {
                if ($fname['type'] == "interview_time" || $fname['type'] == "page_time" || $fname['type'] == "answer_time") {
                    unset($fnames[$fname['fieldname']]);
                    $nfncount--;
                }
            }
            $aDataentryoutput = '';
            foreach ($results as $idrow) {
                $fname = reset($fnames);
                do {
                    if (isset($idrow[$fname['fieldname']])) {
                        $answer = $idrow[$fname['fieldname']];
                    }
                    $question = $fname['question'];
                    $aDataentryoutput .= "\t<tr";
                    if ($highlight) {
                        $aDataentryoutput .= " class='odd'";
                    } else {
                        $aDataentryoutput .= " class='even'";
                    }
                    $highlight = !$highlight;
                    $aDataentryoutput .= ">\n" . "<td>" . "\n";
                    $aDataentryoutput .= stripJavaScript($question);
                    $aDataentryoutput .= "</td>\n" . "<td>\n";
                    //$aDataentryoutput .= "\t-={$fname[3]}=-"; //Debugging info
                    if (isset($fname['qid']) && isset($fname['type'])) {
                        $qidattributes = getQuestionAttributeValues($fname['qid']);
                    }
                    switch ($fname['type']) {
                        case "completed":
                            // First compute the submitdate
                            if ($private == "Y") {
                                // In case of anonymized responses survey with no datestamp
                                // then the the answer submitdate gets a conventional timestamp
                                // 1st Jan 1980
                                $mysubmitdate = date("Y-m-d H:i", mktime(0, 0, 0, 1, 1, 1980));
                                // Note that the completed field only supports 17 chars (so no seconds!)
                            } else {
                                $mysubmitdate = dateShift(date("Y-m-d H:i:s"), "Y-m-d H:i", Yii::app()->getConfig('timeadjust'));
                                // Note that the completed field only supports 17 chars (so no seconds!)
                            }
                            $completedate = empty($idrow['submitdate']) ? $mysubmitdate : $idrow['submitdate'];
                            $selected = empty($idrow['submitdate']) ? 'N' : $completedate;
                            $select_options = array('N' => gT('No', 'unescaped'), $completedate => gT('Yes', 'unescaped'));
                            $aDataentryoutput .= CHtml::dropDownList('completed', $selected, $select_options, array('class' => 'form-control'));
                            break;
                        case "X":
                            //Boilerplate question
                            $aDataentryoutput .= "";
                            break;
                        case "Q":
                        case "K":
                            $aDataentryoutput .= $fname['subquestion'] . '&nbsp;';
                            $aDataentryoutput .= CHtml::textField($fname['fieldname'], $idrow[$fname['fieldname']]);
                            break;
开发者ID:CrandellWS,项目名称:LimeSurvey,代码行数:67,代码来源:dataentry.php


示例2: editdata


//.........这里部分代码省略.........
                $results1['id'] = "";
                $results1['datestamp'] = dateShift(date("Y-m-d H:i:s"), "Y-m-d H:i:s", Yii::app()->getConfig('timeadjust'));
                $results1['ipaddr'] = $saver['ip'];
                $results[] = $results1;
            }
            $aData = array('id' => $id, 'surveyid' => $surveyid, 'subaction' => $subaction, 'part' => 'header', 'clang' => $clang);
            $aViewUrls[] = 'dataentry_header_view';
            $aViewUrls[] = 'edit';
            $highlight = FALSE;
            unset($fnames['lastpage']);
            // unset timings
            foreach ($fnames as $fname) {
                if ($fname['type'] == "interview_time" || $fname['type'] == "page_time" || $fname['type'] == "answer_time") {
                    unset($fnames[$fname['fieldname']]);
                    $nfncount--;
                }
            }
            $aDataentryoutput = '';
            foreach ($results as $idrow) {
                $fname = reset($fnames);
                do {
                    if (isset($idrow[$fname['fieldname']])) {
                        $answer = $idrow[$fname['fieldname']];
                    }
                    $question = $fname['question'];
                    $aDataentryoutput .= "\t<tr";
                    if ($highlight) {
                        $aDataentryoutput .= " class='odd'";
                    } else {
                        $aDataentryoutput .= " class='even'";
                    }
                    $highlight = !$highlight;
                    $aDataentryoutput .= ">\n" . "<td>" . "\n";
                    $aDataentryoutput .= stripJavaScript($question);
                    $aDataentryoutput .= "</td>\n" . "<td>\n";
                    //$aDataentryoutput .= "\t-={$fname[3]}=-"; //Debugging info
                    if (isset($fname['qid']) && isset($fname['type'])) {
                        $qidattributes = getQuestionAttributeValues($fname['qid'], $fname['type']);
                    }
                    switch ($fname['type']) {
                        case "completed":
                            // First compute the submitdate
                            if ($private == "Y") {
                                // In case of anonymized responses survey with no datestamp
                                // then the the answer submitdate gets a conventional timestamp
                                // 1st Jan 1980
                                $mysubmitdate = date("Y-m-d H:i:s", mktime(0, 0, 0, 1, 1, 1980));
                            } else {
                                $mysubmitdate = dateShift(date("Y-m-d H:i:s"), "Y-m-d H:i:s", Yii::app()->getConfig('timeadjust'));
                            }
                            $completedate = empty($idrow['submitdate']) ? $mysubmitdate : $idrow['submitdate'];
                            $selected = empty($idrow['submitdate']) ? 'N' : $completedate;
                            $select_options = array('N' => $clang->gT('No'), $completedate => $clang->gT('Yes'));
                            $aDataentryoutput .= CHtml::dropDownList('completed', $selected, $select_options);
                            break;
                        case "X":
                            //Boilerplate question
                            $aDataentryoutput .= "";
                            break;
                        case "Q":
                        case "K":
                            $aDataentryoutput .= $fname['subquestion'] . '&nbsp;';
                            $aDataentryoutput .= CHtml::textField($fname['fieldname'], $idrow[$fname['fieldname']]);
                            break;
                        case "id":
                            $aDataentryoutput .= CHtml::tag('span', array('style' => 'font-weight: bold;'), '&nbsp;' . $idrow[$fname['fieldname']]);
开发者ID:rawaludin,项目名称:LimeSurvey,代码行数:67,代码来源:dataentry.php


示例3: flattenText

/**
*  This functions removes all HTML tags, Javascript, CRs, linefeeds and other strange chars from a given text
*
* @param string $sTextToFlatten  Text you want to clean
* @param boolan $keepSpan set to true for keep span, used for expression manager. Default: false
* @param boolan $bDecodeHTMLEntities If set to true then all HTML entities will be decoded to the specified charset. Default: false
* @param string $sCharset Charset to decode to if $decodeHTMLEntities is set to true. Default: UTF-8
* @param string $bStripNewLines strip new lines if true, if false replace all new line by \r\n. Default: true
*
* @return string  Cleaned text
*/
function flattenText($sTextToFlatten, $bKeepSpan = false, $bDecodeHTMLEntities = false, $sCharset = 'UTF-8', $bStripNewLines = true)
{
    $sNicetext = stripJavaScript($sTextToFlatten);
    // When stripping tags, add a space before closing tags so that strings with embedded HTML tables don't get concatenated
    $sNicetext = str_replace(array('</td', '</th'), array(' </td', ' </th'), $sNicetext);
    if ($bKeepSpan) {
        // Keep <span> so can show EM syntax-highlighting; add space before tags so that word-wrapping not destroyed when remove tags.
        $sNicetext = strip_tags($sNicetext, '<span><table><tr><td><th>');
    } else {
        $sNicetext = strip_tags($sNicetext);
    }
    // ~\R~u : see "What \R matches" and "Newline sequences" in http://www.pcre.org/pcre.txt - only available since PCRE 7.0
    if ($bStripNewLines) {
        // strip new lines
        if (version_compare(substr(PCRE_VERSION, 0, strpos(PCRE_VERSION, ' ')), '7.0') > -1) {
            $sNicetext = preg_replace(array('~\\R~u'), array(' '), $sNicetext);
        } else {
            // Poor man's replacement for line feeds
            $sNicetext = str_replace(array("\r\n", "\n", "\r"), array(' ', ' ', ' '), $sNicetext);
        }
    } elseif (version_compare(substr(PCRE_VERSION, 0, strpos(PCRE_VERSION, ' ')), '7.0') > -1) {
        $sNicetext = preg_replace(array('~\\R~u'), array("\r\n"), $sNicetext);
    }
    if ($bDecodeHTMLEntities == true) {
        $sNicetext = str_replace('&nbsp;', ' ', $sNicetext);
        // html_entity_decode does not convert &nbsp; to spaces
        $sNicetext = html_entity_decode($sNicetext, ENT_QUOTES, $sCharset);
    }
    $sNicetext = trim($sNicetext);
    return $sNicetext;
}
开发者ID:GuillaumeSmaha,项目名称:LimeSurvey,代码行数:42,代码来源:common_helper.php


示例4: rawurldecode

                        { ?>
                        <td><?php echo rawurldecode($phparray[$index][$metadata]); ?></td>
                        <?php
                    }
                }
                else
                {
                ?>
                <td>&nbsp;</td>
                <?php
                }
            }
            else
            {
                if (isset($fnames[$i][4]) && $fnames[$i][4] == 'D' && $fnames[$i][0] != '')
                {
                    if ($dtrow[$fnames[$i][0]] == NULL)
                        $browsedatafield = "N";
                    else
                        $browsedatafield = "Y";
                }
                else
                {
                    $browsedatafield = htmlspecialchars(strip_tags(stripJavaScript(getExtendedAnswer($surveyid, $fnames[$i][0], $dtrow[$fnames[$i][0]], $oBrowseLanguage))), ENT_QUOTES);
                }
                echo "<td><span>$browsedatafield</span></td>\n";
            }
        }
    ?>
</tr>
开发者ID:rawaludin,项目名称:LimeSurvey,代码行数:30,代码来源:browseallrow_view.php


示例5: eT

<!--
    dataentry/caption_view.php
-->
<div class="side-body">
    <h3><?php 
eT("Data entry");
?>
</h3>
    <div class="row">
        <div class="col-lg-12 content-right">
            <!-- Survey name and description -->
            <div class="jumbotron ">
            <h2><?php 
echo stripJavaScript($thissurvey['name']);
?>
</h2>
            <p><?php 
echo flattenText($thissurvey['description'], true);
?>
</p>
            </div>
        <?php 
echo CHtml::form(array("admin/dataentry/sa/insert"), 'post', array('name' => 'addsurvey', 'id' => 'addsurvey', 'enctype' => 'multipart/form-data'));
?>
            <table class='data-entry-tbl table'>

                <tr class='data-entry-separator'>
                    <td colspan='3'></td>
                </tr>

                <?php 
开发者ID:GuillaumeSmaha,项目名称:LimeSurvey,代码行数:31,代码来源:caption_view.php


示例6: addAnswer

 /**
  *
  * Add answer to PDF
  *
  * @param $sQuestion - Question field text array
  * @param $sResponse - Answer field text array
  * @param $bReplaceExpressions - Try to replace LimeSurvey Expressions. This is false when exporting answers PDF from admin GUI
  *                               because we can not interpret expressions so just purify.
  *                               TODO: Find a universal valid method to interpret expressions
  * @param $bAllowBreakPage - Allow break cell in two pages
  * @return unknown_type
  */
 function addAnswer($sQuestion, $sResponse, $bReplaceExpressions = true, $bAllowBreakPage = false)
 {
     $oPurifier = new CHtmlPurifier();
     $sQuestionHTML = str_replace('-oth-', '', $sQuestion);
     // Copied from Writer::stripTagsFull. Really necessary?
     $sQuestionHTML = html_entity_decode(stripJavaScript($oPurifier->purify($sQuestionHTML)), ENT_COMPAT);
     if ($bReplaceExpressions) {
         $sData['thissurvey'] = $this->_aSurveyInfo;
         $sQuestionHTML = templatereplace($sQuestionHTML, array(), $sData, '', $this->_aSurveyInfo['anonymized'] == "Y", NULL, array(), true);
     }
     $sResponse = flattenText($sResponse, false, true, 'UTF-8', false);
     $startPage = $this->getPage();
     $this->startTransaction();
     $this->SetFontSize($this->_ibaseAnswerFontSize);
     $this->WriteHTMLCell(0, $this->_iCellHeight, $this->getX(), $this->getY(), $sQuestionHTML, 1, 1, true, true, 'L');
     $this->MultiCell(0, $this->_iCellHeight, $sResponse, 1, 'L', 0, 1, '', '', true);
     $this->ln(2);
     if ($this->getPage() != $startPage && !$bAllowBreakPage) {
         $this->rollbackTransaction(true);
         $this->AddPage();
         $this->addAnswer($sQuestion, $sResponse, $bReplaceExpressions, true);
         // "Last param = true" prevents an endless loop if a cell is longer than a page
     } else {
         $this->commitTransaction();
     }
 }
开发者ID:rouben,项目名称:LimeSurvey,代码行数:38,代码来源:pdf.php


示例7: foreach

<?php

$list = '';
foreach ($publicSurveys as $survey) {
    $list .= CHtml::openTag('li');
    $list .= CHtml::link(stripJavaScript($survey->localizedTitle), array('survey/index', 'sid' => $survey->sid, 'lang' => App()->lang->langcode), array('class' => 'surveytitle'));
    if ($survey->publicstatistics == "Y") {
        $list .= CHtml::link('(' . App()->lang->gT('View statistics') . ')', array('statistics_user/action', 'surveyid' => $survey->sid, 'language' => App()->lang->langcode));
    }
    $list .= CHtml::closeTag('li');
}
if (!empty($futureSurveys)) {
    $list .= "</ul><div class=\"survey-list-heading\">" . gT("Following survey(s) are not yet active but you can register for them.") . "</div><ul>";
    foreach ($futureSurveys as $survey) {
        $list .= CHtml::openTag('li');
        $list .= CHtml::link(stripJavaScript($survey->localizedTitle), array('survey/index', 'sid' => $survey->sid, 'lang' => App()->lang->langcode), array('class' => 'surveytitle'));
        $list .= CHtml::closeTag('li');
        $list .= CHtml::tag('div', array('data-regformsurvey' => $survey->sid));
    }
}
if (empty($list)) {
    $list = CHtml::openTag('li', array('class' => 'surveytitle')) . gT("No available surveys") . CHtml::closeTag('li');
}
$data['surveylist'] = array("nosid" => "", "contact" => sprintf(App()->lang->gT("Please contact %s ( %s ) for further assistance."), Yii::app()->getConfig("siteadminname"), encodeEmail(Yii::app()->getConfig("siteadminemail"))), "listheading" => App()->lang->gT("The following surveys are available:"), "list" => $list);
$data['templatedir'] = getTemplatePath(Yii::app()->getConfig("defaulttemplate"));
$data['templateurl'] = getTemplateURL(Yii::app()->getConfig("defaulttemplate")) . "/";
$data['templatename'] = Yii::app()->getConfig("defaulttemplate");
$data['sitename'] = Yii::app()->getConfig("sitename");
$data['languagechanger'] = makeLanguageChanger(App()->lang->langcode);
//A nice exit
sendCacheHeaders();
开发者ID:josetorerobueno,项目名称:test_repo,代码行数:31,代码来源:publicSurveyList.php


示例8: view


//.........这里部分代码省略.........
             } else {
                 $fnames[] = array($field['fieldname'], gT("File count"));
             }
         }
         $nfncount = count($fnames) - 1;
         if ($iId < 1) {
             $iId = 1;
         }
         $exist = SurveyDynamic::model($iSurveyID)->exist($iId);
         $next = SurveyDynamic::model($iSurveyID)->next($iId, true);
         $previous = SurveyDynamic::model($iSurveyID)->previous($iId, true);
         $aData['exist'] = $exist;
         $aData['next'] = $next;
         $aData['previous'] = $previous;
         $aData['id'] = $iId;
         $aViewUrls[] = 'browseidheader_view';
         if ($exist) {
             $oPurifier = new CHtmlPurifier();
             //SHOW INDIVIDUAL RECORD
             $oCriteria = new CDbCriteria();
             if ($bHaveToken) {
                 $oCriteria = SurveyDynamic::model($iSurveyID)->addTokenCriteria($oCriteria);
             }
             $oCriteria->addCondition("id = {$iId}");
             $iIdresult = SurveyDynamic::model($iSurveyID)->findAllAsArray($oCriteria);
             foreach ($iIdresult as $iIdrow) {
                 $iId = $iIdrow['id'];
                 $rlanguage = $iIdrow['startlanguage'];
             }
             $next = SurveyDynamic::model($iSurveyID)->next($iId);
             $previous = SurveyDynamic::model($iSurveyID)->previous($iId);
             $aData['bHasFile'] = false;
             if (isset($rlanguage)) {
                 $aData['rlanguage'] = $rlanguage;
             }
             foreach ($iIdresult as $iIdrow) {
                 $highlight = false;
                 for ($i = 0; $i < $nfncount + 1; $i++) {
                     if ($fnames[$i][0] != 'completed' && is_null($iIdrow[$fnames[$i][0]])) {
                         continue;
                         // irrelevant, so don't show
                     }
                     $inserthighlight = '';
                     if ($highlight) {
                         $inserthighlight = "class='highlight'";
                     }
                     if ($fnames[$i][0] == 'completed') {
                         if ($iIdrow['submitdate'] == NULL || $iIdrow['submitdate'] == "N") {
                             $answervalue = "N";
                         } else {
                             $answervalue = "Y";
                         }
                     } else {
                         if (isset($fnames[$i]['type']) && $fnames[$i]['type'] == "|") {
                             $index = $fnames[$i]['index'];
                             $metadata = $fnames[$i]['metadata'];
                             $phparray = json_decode_ls($iIdrow[$fnames[$i][0]]);
                             if (isset($phparray[$index])) {
                                 switch ($metadata) {
                                     case "size":
                                         $answervalue = sprintf(gT("%s KB"), intval($phparray[$index][$metadata]));
                                         break;
                                     case "name":
                                         $answervalue = CHtml::link($oPurifier->purify(rawurldecode($phparray[$index][$metadata])), $this->getController()->createUrl("/admin/responses", array("sa" => "actionDownloadfile", "surveyid" => $surveyid, "iResponseId" => $iId, "sFileName" => $phparray[$index][$metadata])));
                                         break;
                                     default:
                                         $answervalue = htmlspecialchars(strip_tags(stripJavaScript($phparray[$index][$metadata])));
                                 }
                                 $aData['bHasFile'] = true;
                             } else {
                                 $answervalue = "";
                             }
                         } else {
                             $answervalue = htmlspecialchars(strip_tags(stripJavaScript(getExtendedAnswer($iSurveyID, $fnames[$i][0], $iIdrow[$fnames[$i][0]], $sBrowseLanguage))), ENT_QUOTES);
                         }
                     }
                     $aData['answervalue'] = $answervalue;
                     $aData['inserthighlight'] = $inserthighlight;
                     $aData['fnames'] = $fnames;
                     $aData['i'] = $i;
                     $aViewUrls['browseidrow_view'][] = $aData;
                 }
             }
         } else {
             Yii::app()->session['flashmessage'] = gT("This response ID is invalid.");
         }
         $aViewUrls[] = 'browseidfooter_view';
         $aData['sidemenu']['state'] = false;
         $aData['menu']['edition'] = true;
         $aData['menu']['view'] = true;
         $aData['menu']['close'] = true;
         $this->_renderWrappedTemplate('', $aViewUrls, $aData);
     } else {
         $aData['surveyid'] = $iSurveyID;
         $message['title'] = gT('Access denied!');
         $message['message'] = gT('You do not have sufficient rights to access this page.');
         $message['class'] = "error";
         $this->_renderWrappedTemplate('survey', array("message" => $message), $aData);
     }
 }
开发者ID:BertHankes,项目名称:LimeSurvey,代码行数:101,代码来源:responses.php


示例9: strip_tags

<tr <?php 
echo $inserthighlight;
?>
>
    <th>
        <?php 
if (isset($fnames[$i]['code'])) {
    ?>
            [<strong class="qcode"><?php 
    echo $fnames[$i]['code'];
    ?>
</strong>] 
        <?php 
}
?>
        <?php 
echo strip_tags(stripJavaScript($fnames[$i][1]));
?>
</th>
    <td>
        <?php 
echo $answervalue;
?>
    </td>
</tr>
开发者ID:mfavetti,项目名称:LimeSurvey,代码行数:25,代码来源:browseidrow_view.php


示例10: flattenText

/**
*  This functions removes all HTML tags, Javascript, CRs, linefeeds and other strange chars from a given text
*
* @param string $sTextToFlatten  Text you want to clean
* @param boolan $bDecodeHTMLEntities If set to true then all HTML entities will be decoded to the specified charset. Default: false
* @param string $sCharset Charset to decode to if $decodeHTMLEntities is set to true
*
* @return string  Cleaned text
*/
function flattenText($sTextToFlatten, $keepSpan = false, $bDecodeHTMLEntities = false, $sCharset = 'UTF-8', $bStripNewLines = true)
{
    $sNicetext = stripJavaScript($sTextToFlatten);
    // When stripping tags, add a space before closing tags so that strings with embedded HTML tables don't get concatenated
    $sNicetext = str_replace(array('</td', '</th'), array(' </td', ' </th'), $sNicetext);
    if ($keepSpan) {
        // Keep <span> so can show EM syntax-highlighting; add space before tags so that word-wrapping not destroyed when remove tags.
        $sNicetext = strip_tags($sNicetext, '<span><table><tr><td><th>');
    } else {
        $sNicetext = strip_tags($sNicetext);
    }
    if ($bStripNewLines) {
        // strip new lines
        $sNicetext = preg_replace(array('~\\Ru~'), array(' '), $sNicetext);
    } else {
        $sNicetext = preg_replace(array('~\\Ru~'), array("\r\n"), $sNicetext);
    }
    if ($bDecodeHTMLEntities == true) {
        $sNicetext = str_replace('&nbsp;', ' ', $sNicetext);
        // html_entity_decode does not convert &nbsp; to spaces
        $sNicetext = html_entity_decode($sNicetext, ENT_QUOTES, $sCharset);
    }
    $sNicetext = trim($sNicetext);
    return $sNicetext;
}
开发者ID:rawaludin,项目名称:LimeSurvey,代码行数:34,代码来源:common_helper.php


示例11: eT

<div class='header ui-widget-header'><?php eT("Data entry"); ?></div>

        <?php echo CHtml::form(array("admin/dataentry/sa/insert"), 'post', array('name'=>'addsurvey', 'id'=>'addsurvey', 'enctype'=>'multipart/form-data'));?>
            <table class='data-entry-tbl'>
            <tr>
            <td colspan='3'>
            <strong><?php echo stripJavaScript($thissurvey['name']); ?></strong>
            <br /><?php echo flattenText($thissurvey['description'],true); ?>
            </td>
            </tr>

            <tr class='data-entry-separator'><td colspan='3'></td></tr>

            <?php if (count(Survey::model()->findByPk($surveyid)->additionalLanguages)>0)
            { ?>
                <tr>
                <td colspan='3'>
                <?php echo $langlistbox; ?>
                </td>
                </tr>

                <tr class='data-entry-separator'><td colspan='3'></td></tr>
            <?php }

            if (tableExists('{{tokens_'.$thissurvey['sid'].'}}')) //Give entry field for token id
            { ?>
                <tr>
                <td valign='top' width='1%'></td>
                <td valign='top' align='right' width='30%'><font color='red'>*</font><strong><?php echo $blang->gT("Token"); ?>:</strong></td>
                <td valign='top'  align='left' style='padding-left: 20px'>
                <input type='text' id='token' name='token' onkeyup='activateSubmit(this);' />
开发者ID:krsandesh,项目名称:LimeSurvey,代码行数:31,代码来源:caption_view.php


示例12: view


//.........这里部分代码省略.........
                     }
                     if ($qidattributes['show_comment'] == 1) {
                         $fnames[] = array($field['fieldname'], "File " . ($i + 1) . " - " . $field['question'] . " (Comment)", "type" => "|", "metadata" => "comment", "index" => $i);
                     }
                     $fnames[] = array($field['fieldname'], "File " . ($i + 1) . " - " . $field['question'] . " (File name)", "type" => "|", "metadata" => "name", "index" => $i);
                     $fnames[] = array($field['fieldname'], "File " . ($i + 1) . " - " . $field['question'] . " (File size)", "type" => "|", "metadata" => "size", "index" => $i);
                     //$fnames[] = array($field['fieldname'], "File ".($i+1)." - ".$field['question']." (extension)", "type"=>"|", "metadata"=>"ext",     "index"=>$i);
                 }
             } else {
                 $fnames[] = array($field['fieldname'], "File count");
             }
         }
     }
     $nfncount = count($fnames) - 1;
     if ($iId < 1) {
         $iId = 1;
     }
     $exist = Survey_dynamic::model($iSurveyID)->exist($iId);
     $next = Survey_dynamic::model($iSurveyID)->next($iId, true);
     $previous = Survey_dynamic::model($iSurveyID)->previous($iId, true);
     $aData['exist'] = $exist;
     $aData['next'] = $next;
     $aData['previous'] = $previous;
     $aData['id'] = $iId;
     $aViewUrls[] = 'browseidheader_view';
     if ($exist) {
         //SHOW INDIVIDUAL RECORD
         $oCriteria = new CDbCriteria();
         if ($aData['surveyinfo']['anonymized'] == 'N' && tableExists("{{tokens_{$iSurveyID}}}}")) {
             $oCriteria = Survey_dynamic::model($iSurveyID)->addTokenCriteria($oCriteria);
         }
         // If admin ask an specific response, then show it
         // Don't add incompleteAnsFilterState
         #            if (incompleteAnsFilterState() == 'incomplete')
         #                $oCriteria->addCondition('submitdate = ' . mktime(0, 0, 0, 1, 1, 1980) . ' OR submitdate IS NULL');
         #            elseif (incompleteAnsFilterState() == 'complete')
         #                $oCriteria->addCondition('submitdate >= ' . mktime(0, 0, 0, 1, 1, 1980));
         $oCriteria->addCondition("id = {$iId}");
         $iIdresult = Survey_dynamic::model($iSurveyID)->findAllAsArray($oCriteria);
         foreach ($iIdresult as $iIdrow) {
             $iId = $iIdrow['id'];
             $rlanguage = $iIdrow['startlanguage'];
         }
         $next = Survey_dynamic::model($iSurveyID)->next($iId);
         $previous = Survey_dynamic::model($iSurveyID)->previous($iId);
         if (isset($rlanguage)) {
             $aData['rlanguage'] = $rlanguage;
         }
         foreach ($iIdresult as $iIdrow) {
             $highlight = false;
             for ($i = 0; $i < $nfncount + 1; $i++) {
                 if ($fnames[$i][0] != 'completed' && is_null($iIdrow[$fnames[$i][0]])) {
                     continue;
                     // irrelevant, so don't show
                 }
                 $inserthighlight = '';
                 if ($highlight) {
                     $inserthighlight = "class='highlight'";
                 }
                 if ($fnames[$i][0] == 'completed') {
                     if ($iIdrow['submitdate'] == NULL || $iIdrow['submitdate'] == "N") {
                         $answervalue = "N";
                     } else {
                         $answervalue = "Y";
                     }
                 } else {
                     if (isset($fnames[$i]['type']) && $fnames[$i]['type'] == "|") {
                         $index = $fnames[$i]['index'];
                         $metadata = $fnames[$i]['metadata'];
                         $phparray = json_decode_ls($iIdrow[$fnames[$i][0]]);
                         if (isset($phparray[$index])) {
                             if ($metadata === "size") {
                                 $answervalue = rawurldecode((int) $phparray[$index][$metadata] . " KB");
                             } else {
                                 if ($metadata === "name") {
                                     $answervalue = CHtml::link(rawurldecode($phparray[$index][$metadata]), $this->getController()->createUrl("/admin/responses/sa/index/downloadindividualfile/{$phparray[$index][$metadata]}/fieldname/{$fnames[$i][0]}/id/{$iId}/surveyid/{$iSurveyID}"));
                                 } else {
                                     $answervalue = rawurldecode($phparray[$index][$metadata]);
                                 }
                             }
                         } else {
                             $answervalue = "";
                         }
                     } else {
                         $answervalue = htmlspecialchars(strip_tags(stripJavaScript(getExtendedAnswer($iSurveyID, $fnames[$i][0], $iIdrow[$fnames[$i][0]], $oBrowseLanguage))), ENT_QUOTES);
                     }
                 }
                 $aData['answervalue'] = $answervalue;
                 $aData['inserthighlight'] = $inserthighlight;
                 $aData['fnames'] = $fnames;
                 $aData['i'] = $i;
                 $aViewUrls['browseidrow_view'][] = $aData;
             }
         }
     } else {
         Yii::app()->session['flashmessage'] = $clang->gT("This response ID is invalid.");
     }
     $aViewUrls[] = 'browseidfooter_view';
     $this->_renderWrappedTemplate('', $aViewUrls, $aData);
 }
开发者ID:ryu1inaba,项目名称:LimeSurvey,代码行数:101,代码来源:responses.php


示例13: if

     </form>
<?php } ?>
</td><td><?php echo $assess['sid'];?></td>
<?php if ($assess['scope'] == "T") { ?>
	<td><?php $clang->eT("Total");?></td>
	<td>-</td>
<?php } else { ?>
	<td><?php $clang->eT("Question group");?></td>
	<td><?php echo $groups[$assess['gid']]." (".$assess['gid'].")";?></td>
<?php } ?>


<td><?php echo $assess['minimum'];?></td>
<td><?php echo $assess['maximum'];?></td>
<td><?php echo stripslashes($assess['name']);?></td>
<td><?php echo strip_tags(stripJavaScript($assess['message']));?></td>

</tr>
<?php } ?>
</tbody></table>

<?php if ((hasSurveyPermission($surveyid, 'assessments','update') && $actionvalue=="assessmentupdate") || (hasSurveyPermission($surveyid, 'assessments','create')&& $actionvalue=="assessmentadd")) { ?>
<br /><form method='post' class='form30' id='assessmentsform' name='assessmentsform' action='<?php echo $this->createUrl("admin/assessments/index/surveyid/$surveyid");?>'>
	<div class='header ui-widget-header'><?php echo $actiontitle;?></div>
	<ul class="assessmentscope"><li><label><?php $clang->eT("Scope");?></label>
	<input type='radio' id='radiototal' name='scope' value='T' <?php
    if (!isset($editdata) || $editdata['scope'] == "T") {echo "checked='checked' ";} ?>/>
    <label for='radiototal'><?php $clang->eT("Total");?></label>
    <input type='radio' id='radiogroup' name='scope' value='G' <?php
    if (isset($editdata) && $editdata['scope'] == "G") {echo " checked='checked' ";} ?>/>
    <label for='radiogroup'><?php $clang->eT("Group");?></label></li>
开发者ID:rawaludin,项目名称:LimeSurvey,代码行数:31,代码来源:assessments_view.php


示例14: flattenText

    }
    if ($currentgroup != $fn[1]) {
        $currentgroup = $fn[1];
        if ($gbc == "odd") {
            $gbc = "even";
        } else {
            $gbc = "odd";
        }
    }
    ?>
            <th class='<?php 
    echo $gbc;
    ?>
'>
                <strong><?php 
    echo flattenText(stripJavaScript($fn[1]), true);
    ?>
</strong>
            </th>
            <?php 
}
?>
    </tr>
</thead>
<tfoot>
    <tr>
        <td colspan=<?php 
echo $fncount + 2;
?>
>
            <?php 
开发者ID:ryu1inaba,项目名称:LimeSurvey,代码行数:31,代码来源:browsetimeheader_view.php


示例15: flattenText

                }
                if ($currentgroup != $fn[1])
                {
                    $currentgroup = $fn[1];
                    if ($gbc == "odd")
                    {
                        $gbc = "even";
                    }
                    else
                    {
                        $gbc = "odd";
                    }
                }
            ?>
            <th class='<?php echo $gbc; ?>'>
                <strong><?php echo flattenText(stripJavaScript($fn[1]), true); ?></strong>
            </th>
            <?php } ?>
    </tr>
</thead>
<tfoot>
    <tr>
        <td colspan=<?php echo $fncount + 2; ?>>
            <?php if (hasSurveyPermission($iSurveyId, 'responses', 'delete')) { ?>
                <img id='imgDeleteMarkedResponses' src='<?php echo $sImageURL; ?>token_delete.png' alt='<?php $clang->eT('Delete marked responses'); ?>' />
                <?php } ?>
            <?php if (hasFileUploadQuestion($iSurveyId)) { ?>
                <img id='imgDownloadMarkedFiles' src='<?php echo $sImageURL; ?>down_all.png' alt='<?php $clang->eT('Download marked files'); ?>' />
                <?php } ?>
        </td>
    </tr>
开发者ID:rawaludin,项目名称:LimeSurvey,代码行数:31,代码来源:browseallheader_view.php



注:本文中的stripJavaScript函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP stripPost函数代码示例发布时间:2022-05-23
下一篇:
PHP stripHTML函数代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap