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


PHP Links::render方法代码示例

本文整理汇总了PHP中Links::render方法的典型用法代码示例。如果您正苦于以下问题:PHP Links::render方法的具体用法?PHP Links::render怎么用?PHP Links::render使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Links的用法示例。


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

示例1: render

    public static function render($current_page = "")
    {
        echo '<div class="navbar navbar-fixed-top">
			      <div class="navbar-inner">
			        <div class="container">
			          <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
			      	 	<span class="icon-bar"></span>
			      	 	<span class="icon-bar"></span>
			      	 	<span class="icon-bar"></span>
			          </a>
			          <a class="brand" href="/">Commando.io</a>
			          <div class="nav-collapse">
			            <ul class="nav">';
        foreach (Navigation::$pages as $page => $icon) {
            if ($page === strtolower($current_page)) {
                echo '<li class="active">';
            } else {
                echo '<li>';
            }
            echo '<a href="' . Links::render($page) . '"><i class="' . $icon . '"></i> ' . ucfirst($page) . '</a></li>';
        }
        echo '</ul>';
        if (!empty(Navigation::$right)) {
            echo '<ul class="nav pull-right">' . Navigation::$right . '</ul>';
        }
        echo '</div>
			        </div>
			      </div>
			    </div>';
    }
开发者ID:tsing,项目名称:commando,代码行数:30,代码来源:Navigation.php

示例2: dirname

<?php

/*
# Copyright 2012 NodeSocket, LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
*/
require_once dirname(__DIR__) . "/classes/Requires.php";
Functions::check_required_parameters(array($_GET['id'], $_GET['version']));
if (!CSRF::is_valid(1, METHOD_GET)) {
    Error::halt(400, 'bad request', 'Missing required security token.');
}
MySQLQueries::edit_recipe_head($_GET['id'], $_GET['version']);
Functions::redirect(Links::render("view-recipe", array($_GET['id'])));
开发者ID:tsing,项目名称:commando,代码行数:24,代码来源:edit_recipe_head.php

示例3: array

?>
</textarea>
				    			<p class="help-block" style="clear: both;">Optional notes and comments you wish to attach to the recipe. <a href="http://daringfireball.net/projects/markdown/">Markdown</a> is supported.</p>
				    		</div>
				    	</div>
				    	<div class="control-group">
				    		<label class="control-label" for="recipe-editor">Recipe</label>
				    		<div class="controls">
				    			<textarea id="recipe-editor" name="content"><?php 
echo $recipe->content;
?>
</textarea>
				    			<p class="help-block" style="clear: both;"></p>
				    		</div>
				    	</div>
				    	<div class="control-group">
							<div class="controls">
								<a class="btn btn-primary" id="edit-recipe-submit" onclick="validate_edit_recipe();"><i class="icon-ok-sign icon-white"></i> Update Recipe</a>
								<a class="btn" href="<?php 
echo Links::render("view-recipe", array($recipe->id));
?>
">Cancel</a>
							</div>
				       </div>
				    </fieldset>
		        </form>
    		</div> 
		</div>
	  </div>   
<?php 
Footer::render(array("chosen", "codemirror", "autosize", "edit-recipe"));
开发者ID:tsing,项目名称:commando,代码行数:31,代码来源:edit-recipe.php

示例4: ucfirst

echo ucfirst($execution_history['recipe']['interpreter']);
?>
</a>
			                	</li>
	                		</ul>
	              		</div>
            		</div>
          		</div>
				<div id="contents-loading" class="progress progress-striped active">
					<div class="bar" style="width: 100%;"></div>
				</div>
				<div id="execution-history-contents" style="display: none;">
					<div style="float: right; position: relative; top: 0px; right: 0px;">
						<a href="<?php 
echo Links::render("download-execution-history", array($execution_history['_id']->__toString()));
?>
" class="btn btn-medium"><i class="icon-download-alt"></i> Download JSON</a> <a href="<?php 
echo Links::render("view-execution-history-raw", array($execution_history['_id']->__toString()));
?>
" class="btn btn-medium"><i class="icon-align-left"></i> Raw</a>
					</div>
					<pre class="prettyprint linenums"><?php 
echo htmlentities(@json_encode($execution_history, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE));
?>
</pre>
				</div>
    		</div>
		</div>
	  </div>
<?php 
Footer::render(array("code-pretty", "zclip", "view-execution-history"));
开发者ID:tsing,项目名称:commando,代码行数:31,代码来源:view-execution-history.php

示例5: dirname

<?php

/*
# Copyright 2012 NodeSocket, LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
*/
require_once dirname(__DIR__) . "/classes/Requires.php";
Functions::check_required_parameters(array($_POST['name']));
MySQLQueries::add_group($_POST['name']);
Functions::redirect(Links::render("groups"));
开发者ID:tsing,项目名称:commando,代码行数:21,代码来源:add_group.php

示例6: dirname

# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
*/
require_once dirname(__DIR__) . "/classes/Requires.php";
//Get files
$files = array();
MongoConnection::connect();
MongoConnection::grid_fs();
$results = MongoConnection::grid_fs_find();
$results->sort(array("uploadDate" => -1));
MongoConnection::close();
foreach ($results as $result) {
    $result->file['uploadDate'] = date(DATE_FORMAT, $result->file['uploadDate']->sec + Functions::timezone_offset_in_seconds());
    $files[] = $result->file;
}
$html = "";
if (count($files) === 0) {
    $html .= '<div id="no-files" class="alert alert-grey no-bottom-margin">No files added. Drag a file into the upload box above.</div>';
} else {
    $html .= '<div class="control-group"><div class="controls"><a id="delete-files" class="btn disabled"><i class="icon-remove"></i> Delete Selected</a></div></div><table class="table table-striped table-hover table-bordered table-condensed"><thead><tr><th><input type="checkbox" id="files-delete-all-check" /></th><th>Action</th><th>ID</th><th>Name</th><th>Type</th><th>Size</th><th>Added</th></tr></thead><tbody>';
    foreach ($files as $file) {
        $html .= '<tr id="' . $file['_id'] . '" class="file"><td><input type="checkbox" class="file-delete-check" value="' . $file['_id'] . '" /></td><td><a href="' . Links::render("download-file", array($file['_id']->__toString())) . '" class="btn btn-mini"><i class="icon-download-alt"></i></a>';
        $html .= strpos($file['type'], 'text') !== false || $file['type'] === "application/json" ? ' <a href="' . Links::render("view-file-raw", array($file['_id']->__toString())) . '" class="btn btn-mini"><i class="icon-align-left"></i>' : null;
        $html .= '</td><td><a class="btn btn-mini disabled expand-west expand-file-id">' . Functions::add_ellipsis_reverse($file['_id'], 8) . '</a></td><td><a href="' . Links::render("view-file", array($file['_id']->__toString())) . '">' . $file['real_filename'] . '</a></td><td><span class="badge badge-info">';
        $html .= empty($file['type']) ? "unknown" : $file['type'];
        $html .= '</span></td><td>' . Functions::format_bytes($file['length']) . '</td><td>' . $file['uploadDate'] . '</td></tr>';
    }
    $html .= '</tbody></table>';
}
echo '{"count":' . count($files) . ',"html":' . json_encode($html) . '}';
开发者ID:tsing,项目名称:commando,代码行数:31,代码来源:get_files.php

示例7: dirname

<?php

/*
# Copyright 2012 NodeSocket, LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
*/
require_once dirname(__DIR__) . "/classes/Requires.php";
Functions::check_required_parameters(array($_GET['id']));
if (!CSRF::is_valid(METHOD_GET)) {
    Error::halt(400, 'bad request', 'Missing required security token.');
}
MySQLQueries::delete_recipes(array($_GET['id']));
Functions::redirect(Links::render("recipes"));
开发者ID:ralexandru,项目名称:commando,代码行数:24,代码来源:delete_recipe.php

示例8:

          </div>
        </div>
		<div class="span3">
        	<div class="well">
        		<h1 style="margin-bottom: 10px;"><a href="<?php 
echo Links::render("recipes");
?>
">Recipes</a></h1>
         		<p>Recipes are containers of commands that are fully versioned. Recipes can be written in pure shell, bash, perl, python, or node.js.</p>
          		<p><a class="btn btn-primary btn-large" href="<?php 
echo Links::render("recipes");
?>
">Recipes &raquo;</a></p>
        	</div>
        </div>
        <div class="span3">
        	<div class="well">
        		<h1 style="margin-bottom: 10px;"><a href="<?php 
echo Links::render("files");
?>
">Files</a></h1>
         		<p>Files is a centralized place to store text or binary files and then SCP transfer them to groups of servers via recipes.</p>
          		<p><a class="btn btn-primary btn-large" href="<?php 
echo Links::render("files");
?>
">Files &raquo;</a></p>
        	</div>
        </div>
      </div>
<?php 
Footer::render(array("index"));
开发者ID:tsing,项目名称:commando,代码行数:31,代码来源:index.php

示例9:

				        </div>
				        <div class="control-group">
				    		<label class="control-label" for="recipe-notes">Notes</label>
				    		<div class="controls">
				    			<textarea id="recipe-notes" name="notes"></textarea>
				    			<p class="help-block" style="clear: both;">Optional notes and comments you wish to attach to the recipe. <a href="http://daringfireball.net/projects/markdown/">Markdown</a> is supported.</p>
				    		</div>
				    	</div>
				    	<div class="control-group">
				    		<label class="control-label" for="recipe-editor">Recipe</label>
				    		<div class="controls">
				    			<textarea id="recipe-editor" name="content"></textarea>
				    			<p class="help-block" style="clear: both;"></p>
				    		</div>
				    	</div>
				    	<div class="control-group">
							<div class="controls">
								<a class="btn btn-primary" id="add-recipe-submit" onclick="validate_add_recipe();"><i class="icon-ok-sign icon-white"></i> Add Recipe</a>
								<a class="btn" href="<?php 
echo Links::render("recipes");
?>
">Cancel</a>
							</div>
				       </div>
				    </fieldset>
	        	</form>
    		</div> 
		</div>
	  </div>   
<?php 
Footer::render(array("chosen", "codemirror", "autosize", "add-recipe"));
开发者ID:tsing,项目名称:commando,代码行数:31,代码来源:add-recipe.php

示例10: dirname

<?php

/*
# Copyright 2012 NodeSocket, LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
*/
require_once dirname(__DIR__) . "/classes/Requires.php";
Functions::check_required_parameters(array($_POST['label'], $_POST['address'], $_POST['ssh_username'], $_POST['ssh_port']));
MySQLQueries::add_server($_POST['label'], $_POST['group'], $_POST['tags'], $_POST['address'], $_POST['ssh_username'], $_POST['ssh_port']);
Functions::redirect(Links::render("servers"));
开发者ID:tsing,项目名称:commando,代码行数:21,代码来源:add_server.php

示例11:

	          					<b class="caret"></b>
	    					</a>
	    					<ul class="dropdown-menu"></ul>
	    			   </li>');
Navigation::render("execute");
?>
    
    <div class="container">
           
      <h1 class="header">Execute</h1> 
      
      <div class="row">
   	  	<div class="span12">
   	  		<div class="well">
   	 			<a href="<?php 
echo Links::render("execution-history");
?>
" class="btn btn-primary btn-large"><i class="icon-time icon-white"></i> Execution History</a>
				<div style="float: right">	
					<div class="input-prepend" style="float: right">
						<span class="add-on">
							<i class="icon-search"></i>
						</span><input id="search-results" type="text" class="span2" maxlength="100" placeholder="Search Results…" disabled="disabled" />
					</div>
				</div>
				<div class="clear"></div>
   	  		</div>
      	</div>
      </div>
      
	  <div class="row">
开发者ID:tsing,项目名称:commando,代码行数:31,代码来源:execute.php

示例12: array

				<div id="recipe-contents" style="display: none;">
					<div style="float: right; position: relative; top: 0px; right: 0px;">
						<a href="<?php 
if ($recipe->recipe_version === $head->recipe_version) {
    echo Links::render("download-recipe", array($recipe->id));
} else {
    echo Links::render("download-recipe", array($recipe->id, $recipe->recipe_version));
}
?>
						" class="btn btn-medium"><i class="icon-download-alt"></i> Download</a>
						
						<a href="<?php 
if ($recipe->recipe_version === $head->recipe_version) {
    echo Links::render("view-recipe-raw", array($recipe->id));
} else {
    echo Links::render("view-recipe-raw", array($recipe->id, $recipe->recipe_version));
}
?>
						" class="btn btn-medium"><i class="icon-align-left"></i> Raw</a>
					</div>
					<pre class="prettyprint <?php 
echo $code_pretty_lang;
?>
 linenums"><?php 
echo htmlentities($recipe->content);
?>
</pre>
    			</div>
    		</div>
		</div>
	  </div>
开发者ID:tsing,项目名称:commando,代码行数:31,代码来源:view-recipe.php

示例13: dirname

<?php

/*
# Copyright 2012 NodeSocket, LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
*/
require_once dirname(__DIR__) . "/classes/Requires.php";
Functions::check_required_parameters(array($_GET['id']));
if (!CSRF::is_valid(1, METHOD_GET)) {
    Error::halt(400, 'bad request', 'Missing required security token.');
}
MongoConnection::connect();
MongoConnection::grid_fs();
MongoConnection::grid_fs_delete(array($_GET['id']));
MongoConnection::close();
Functions::redirect(Links::render("files"));
开发者ID:tsing,项目名称:commando,代码行数:27,代码来源:delete_file.php

示例14: dirname

<?php

/*
# Copyright 2012 NodeSocket, LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
*/
require_once dirname(__DIR__) . "/classes/Requires.php";
$data = array("instance_key" => $_POST['instance_key'], "default_ssh_username" => $_POST['default_ssh_username'], "default_ssh_port" => $_POST['default_ssh_port'], "default_interpreter" => $_POST['default_interpreter'], "timezone_offset" => $_POST['timezone_offset'], "timezone_daylight_savings" => $_POST['timezone_daylight_savings']);
MySQLQueries::edit_settings(json_encode((object) $data));
Functions::redirect(Links::render("settings", array("saved")));
开发者ID:tsing,项目名称:commando,代码行数:21,代码来源:edit_settings.php

示例15: array

    ?>
" class="btn btn-medium"><i class="icon-download-alt"></i> Download</a> <a href="<?php 
    echo Links::render("view-file-raw", array($file['_id']->__toString()));
    ?>
" class="btn btn-medium"><i class="icon-align-left"></i> Raw</a>
						</div>
						<pre class="prettyprint linenums"><?php 
    echo htmlentities($file['data']);
    ?>
</pre>
					</div>
				<?php 
} else {
    ?>
					<div class="alert alert-grey binary-file">
						<div style="float: right; position: relative; top: -11px; right: -11px;">
							<a href="<?php 
    echo Links::render("download-file", array($file['_id']->__toString()));
    ?>
" class="btn btn-medium"><i class="icon-download-alt"></i> Download</a>
						</div>
						<h3 style="margin-left: 112px; color: #cacaca;">Binary file.</h3>
					</div>
				<?php 
}
?>
    		</div>
		</div>
	  </div>
<?php 
Footer::render(array("code-pretty", "codemirror", "autosize", "zclip", "bootbox", "view-file"));
开发者ID:tsing,项目名称:commando,代码行数:31,代码来源:view-file.php


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