当前位置: 首页>>代码示例>>PHP>>正文


PHP hasResources函数代码示例

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


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

示例1: _tabResourceManagement

 /**
  * survey::_tabResourceManagement()
  * Load "Resources" tab.
  * @param mixed $iSurveyID
  * @return
  */
 private function _tabResourceManagement($iSurveyID)
 {
     global $sCKEditorURL;
     // TAB Uploaded Resources Management
     $ZIPimportAction = " onclick='if (validatefilename(this.form,\"" . gT('Please select a file to import!', 'js') . "\")) { this.form.submit();}'";
     if (!function_exists("zip_open")) {
         $ZIPimportAction = " onclick='alert(\"" . gT("zip library not supported by PHP, Import ZIP Disabled", "js") . "\");'";
     }
     $disabledIfNoResources = '';
     if (hasResources($iSurveyID, 'survey') === false) {
         $disabledIfNoResources = " disabled='disabled'";
     }
     //$aData['esrow'] = $esrow;
     $aData['ZIPimportAction'] = $ZIPimportAction;
     $aData['disabledIfNoResources'] = $disabledIfNoResources;
     $dqata['sCKEditorURL'] = $sCKEditorURL;
     return $aData;
 }
开发者ID:nicbon,项目名称:LimeSurvey,代码行数:24,代码来源:surveyadmin.php

示例2: array

?>
                <ul>
                    <li>
                        <label>&nbsp;</label>
                        <?php 
echo CHtml::dropDownList('type', 'files', array('files' => $clang->gT('Files'), 'flash' => $clang->gT('Flash'), 'images' => $clang->gT('Images')));
?>
                        <input type='submit' value="<?php 
$clang->eT("Browse uploaded resources");
?>
" />
                    </li>
                    <li>
                        <label>&nbsp;</label>
                        <input type='button'<?php 
echo hasResources($lid, 'label') === false ? ' disabled="disabled"' : '';
?>
                            onclick='window.open("<?php 
echo $this->createUrl("/admin/export/sa/resources/export/label/lid/{$lid}");
?>
", "_blank")'
                            value="<?php 
$clang->eT("Export resources as ZIP archive");
?>
"  />
                    </li>
                </ul>
                <input type='hidden' name='lid' value='<?php 
echo $lid;
?>
' />
开发者ID:pmaonline,项目名称:limesurvey-quickstart,代码行数:31,代码来源:labelview_view.php

示例3: foreach

            $i++;
        }
        
        $labelsoutput .= "<div id='tabs'><ul>";
        foreach($tab_title as $i=>$eachtitle){
            $labelsoutput .= "<li><a href='#neweditlblset$i'>$eachtitle</a></li>";
        }
        $labelsoutput .= "<li><a href='#up_resmgmt'>".$clang->gT("Uploaded Resources Management")."</a></li>";
        $labelsoutput .= "</ul>";
        
        foreach($tab_content as $i=>$eachcontent){
            $labelsoutput .= "<div id='neweditlblset$i'>$eachcontent</div>";
        }
        $labelsoutput .="</form>";
        $disabledIfNoResources = '';
        if (hasResources($lid,'label') === false)
        {
            $disabledIfNoResources = " disabled='disabled'";
        }

        // TAB for resources management
        $ZIPimportAction = " onclick='if (validatefilename(this.form,\"".$clang->gT('Please select a file to import!','js')."\")) {this.form.submit();}'";
        if (!function_exists("zip_open"))
        {
            $ZIPimportAction = " onclick='alert(\"".$clang->gT("zip library not supported by PHP, Import ZIP Disabled","js")."\");'";
        }
        
        $labelsoutput.="<div id='up_resmgmt'><div>\t<form class='form30' enctype='multipart/form-data' id='importlabelresources' name='importlabelresources' action='$scriptname' method='post' onsubmit='return validatefilename(this,\"".$clang->gT('Please select a file to import!','js')."\");'>\n"
        . "\t<input type='hidden' name='lid' value='$lid' />\n"
        . "\t<input type='hidden' name='action' value='importlabelresources' />\n"
        . "\t<ul style='list-style-type:none; text-align:center'>\n"
开发者ID:nmklong,项目名称:limesurvey-cdio3,代码行数:31,代码来源:labels.php

示例4: array

     </h4>
 </div>            
 
 <div id="collapseOne" class="panel-collapse collapse in" role="tabpanel" aria-labelledby="headingOne">
     <div class="panel-body">
         <div>
             <?php echo CHtml::form('third_party/kcfinder/browse.php?language='.sTranslateLangCode2CK(App()->language), 'get', array('id'=>'browselabelresources','class'=>'form30','name'=>'browselabelresources','target'=>'_blank')); ?>
                 <ul class="list-unstyled">
                     <li>
                         <label>&nbsp;</label>
                         <?php echo CHtml::dropDownList('type', 'files', array('files' => gT('Files'), 'flash' => gT('Flash'), 'images' => gT('Images'))); ?>
                         <input type='submit' value="<?php eT("Browse uploaded resources") ?>" />
                     </li>
                     <li>
                         <label>&nbsp;</label>
                         <input class="btn btn-default" type='button'<?php echo hasResources($lid, 'label') === false ? ' disabled="disabled"' : '' ?>
                             onclick='window.open("<?php echo $this->createUrl("/admin/export/sa/resources/export/label/lid/$lid"); ?>", "_blank")'
                             value="<?php eT("Export resources as ZIP archive") ?>"  />
                     </li>
                 </ul>
                 <input type='hidden' name='lid' value='<?php echo $lid; ?>' />
             </form>
             <?php echo CHtml::form(array('admin/labels/sa/importlabelresources'), 'post', array('id'=>'importlabelresources',
                                                                                       'class'=>'form30',
                                                                                       'name'=>'importlabelresources',
                                                                                       'enctype'=>'multipart/form-data',
                                                                                       'onsubmit'=>'return validatefilename(this, "'.gT('Please select a file to import!', 'js').'");')); ?>
                 <ul class="list-unstyled">
                     <li>
                         <label for='the_file'><?php eT("Select ZIP file:") ?></label>
                         <input id='the_file' name="the_file" type="file" />
开发者ID:jgianpiere,项目名称:lime-survey,代码行数:31,代码来源:labelview_view.php

示例5: getFleetStat

      <td>' . getFleetStat($str, $sid, $fid) . '</td>
      <td><input type="text" name="ship' . $x . '" value="0" size="1"></td>
      <td></td>
    </tr>';
    }
}
echo '</table>';
/***************
PRINT OTHER FLEETS
***************/
echo '<center>';
if (getFleetStat(destination, $sid, $fid) == 0) {
    $pid = getFleetStat(loc, $sid, $fid);
    $query = "SELECT id,name,ship1,ship2,ship3,ship4,ship5,ship6,ship7 FROM fleet{$sid} WHERE ownerid={$id} AND loc={$pid} AND destination=0";
    $result = mysql_query($query);
    if (hasResources($sid, $fid)) {
        echo '<br><br>You can not move ships in a fleet that still has resources.';
    } else {
        if (mysql_num_rows($result) == 1) {
            echo '<br><br>You have no other fleets at this location';
        } else {
            echo '<select name="fleet">';
            while ($row = mysql_fetch_array($result)) {
                if ($row[id] != $fid) {
                    echo '<option value="' . $row[id] . '">' . $row[name] . ' [' . ($row[ship1] + $row[ship2] + $row[ship3] + $row[ship4] + $row[ship5] + $row[ship6] + $row[ship7]) . ']</option>';
                }
            }
            echo '
    <input type="submit" value="Move Ships">
    <input type="hidden" value="true" name="fleetadd">
    </form>';
开发者ID:sp1ke77,项目名称:playconquest,代码行数:31,代码来源:fleetdetails.php

示例6: isEmpty

     // End Import TAB
     $editsurvey .= "</div>\n";
     // Copy survey TAB
     $editsurvey .= "<div id='copy'>\n";
     // Copy survey
     $editsurvey .= "<form class='form30' action='{$scriptname}' id='copysurveyform' method='post' onsubmit=\"return (isEmpty(document.getElementById('copysurveylist'), '" . $clang->gT("Error: You have to select an existing survey.", 'js') . "') || isEmpty(document.getElementById('copysurveyname'), '" . $clang->gT("Error: You enter a name for the survey copy.", 'js') . "'));\">\n" . "<ul>\n" . "<li><label for='copysurveylist'><span class='annotationasterisk'>*</span>" . $clang->gT("Select survey to copy:") . "</label>\n" . "<select id='copysurveylist' name='copysurveylist'>\n" . getsurveylist(false, true) . "</select> <span class='annotation'>" . $clang->gT("*Required") . "</span></li>\n" . "<li><label for='copysurveyname'><span class='annotationasterisk'>*</span>" . $clang->gT("New survey title:") . "</label>\n" . "<input type='text' id='copysurveyname' size='82' maxlength='200' name='copysurveyname' value='' />" . "<span class='annotation'>" . $clang->gT("*Required") . "</span></li>\n" . "<li><label for='copysurveytranslinksfields'>" . $clang->gT("Convert resource links and INSERTANS fields?") . "</label>\n" . "<input id='copysurveytranslinksfields' name=\"copysurveytranslinksfields\" type=\"checkbox\" checked='checked'/></li>\n" . "<li><label for='copysurveyexcludequotas'>" . $clang->gT("Exclude quotas?") . "</label>\n" . "<input id='copysurveyexcludequotas' name=\"copysurveyexcludequotas\" type=\"checkbox\" /></li>\n" . "<li><label for='copysurveyexcludeanswers'>" . $clang->gT("Exclude answers?") . "</label>\n" . "<input id='copysurveyexcludeanswers' name=\"copysurveyexcludeanswers\" type=\"checkbox\" /></li>\n" . "<li><label for='copysurveyresetconditions'>" . $clang->gT("Reset conditions?") . "</label>\n" . "<input id='copysurveyresetconditions' name=\"copysurveyresetconditions\" type=\"checkbox\" /></li></ul>\n" . "<p><input type='submit' value='" . $clang->gT("Copy survey") . "' />\n" . "<input type='hidden' name='action' value='copysurvey' /></p></form>\n";
     // End Copy survey TAB
     $editsurvey .= "</div>\n";
 } elseif ($action = "editsurveysettings") {
     // TAB Uploaded Resources Management
     $ZIPimportAction = " onclick='if (validatefilename(this.form,\"" . $clang->gT('Please select a file to import!', 'js') . "\")) {this.form.submit();}'";
     if (!function_exists("zip_open")) {
         $ZIPimportAction = " onclick='alert(\"" . $clang->gT("zip library not supported by PHP, Import ZIP Disabled", "js") . "\");'";
     }
     $disabledIfNoResources = '';
     if (hasResources($surveyid, 'survey') === false) {
         $disabledIfNoResources = " disabled='disabled'";
     }
     $editsurvey .= "<div id='resources'>\n" . "<form enctype='multipart/form-data'  class='form30' id='importsurveyresources' name='importsurveyresources' action='{$scriptname}' method='post' onsubmit='return validatefilename(this,\"" . $clang->gT('Please select a file to import!', 'js') . "\");'>\n" . "<input type='hidden' name='sid' value='{$surveyid}' />\n" . "<input type='hidden' name='action' value='importsurveyresources' />\n" . "<ul>\n" . "<li><label>&nbsp;</label>\n" . "<input type='button' onclick='window.open(\"{$homeurl}/scripts/kcfinder/browse.php\", \"_blank\")' value=\"" . $clang->gT("Browse Uploaded Resources") . "\" {$disabledIfNoResources} /></li>\n" . "<li><label>&nbsp;</label>\n" . "<input type='button' onclick='window.open(\"{$scriptname}?action=exportsurvresources&amp;sid={$surveyid}\", \"_blank\")' value=\"" . $clang->gT("Export Resources As ZIP Archive") . "\" {$disabledIfNoResources} /></li>\n" . "<li><label for='the_file'>" . $clang->gT("Select ZIP File:") . "</label>\n" . "<input id='the_file' name='the_file' type='file' size='50' /></li>\n" . "<li><label>&nbsp;</label>\n" . "<input type='button' value='" . $clang->gT("Import Resources ZIP Archive") . "' {$ZIPimportAction} /></li>\n" . "</ul></form>\n";
     // End TAB Uploaded Resources Management
     $editsurvey .= "</div>\n";
 }
 // End TAB pane
 $editsurvey .= "</div>\n";
 // The external button to submit Survey edit changes
 if ($action == "newsurvey") {
     $cond = "if (isEmpty(document.getElementById('surveyls_title'), '" . $clang->gT("Error: You have to enter a title for this survey.", 'js') . "'))";
     $editsurvey .= "<p><button onclick=\"{$cond} {document.getElementById('addnewsurvey').submit();}\" class='standardbtn' >" . $clang->gT("Save") . "</button></p>\n";
 } elseif ($action == "editsurveysettings") {
     $cond = "if (UpdateLanguageIDs(mylangs,'" . $clang->gT("All questions, answers, etc for removed languages will be lost. Are you sure?", "js") . "'))";
     if (bHasSurveyPermission($surveyid, 'surveysettings', 'update')) {
开发者ID:ddrmoscow,项目名称:queXS,代码行数:31,代码来源:editsurveysettings.php

示例7: array

            }
        ?>
    </form>
    <div id='up_resmgmt'>
        <div>
            <form class='form30' id='browselabelresources' name='browselabelresources'
                action='<?php echo $this->createUrl("admin/kcfinder/index/load/browse"); ?>' method='get' target="_blank">
                <ul style='list-style-type:none; text-align:center'>
                    <li>
                        <label>&nbsp;</label>
                        <?php echo CHtml::dropDownList('type', 'files', array('files' => $clang->gT('Files'), 'flash' => $clang->gT('Flash'), 'images' => $clang->gT('Images'))); ?>
                        <input type='submit' value="<?php $clang->eT("Browse uploaded resources") ?>" />
                    </li>
                    <li>
                        <label>&nbsp;</label>
                        <input type='button'<?php echo hasResources($lid, 'label') === false ? ' disabled="disabled"' : '' ?>
                            onclick='window.open("<?php echo $this->createUrl("/admin/export/resources/export/label/lid/$lid"); ?>", "_blank")'
                            value="<?php $clang->eT("Export resources as ZIP archive") ?>"  />
                    </li>
                </ul>
            </form>
            <form class='form30' enctype='multipart/form-data' id='importlabelresources' name='importlabelresources'
                action='<?php echo $this->createUrl('/admin/labels/importlabelresources') ?>' method='post'
                onsubmit='return validatefilename(this, "<?php $clang->eT('Please select a file to import!', 'js') ?>");'>

                <input type='hidden' name='lid' value='<?php echo $lid; ?>' />
                <input type='hidden' name='action' value='importlabelresources' />
                <ul style='list-style-type:none; text-align:center'>
                    <li>
                        <label for='the_file'><?php $clang->eT("Select ZIP file:") ?></label>
                        <input id='the_file' name="the_file" type="file" />
开发者ID:rawaludin,项目名称:LimeSurvey,代码行数:31,代码来源:labelview_view.php


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