コード例 #1
0
ファイル: us-tides.php プロジェクト: bobbingwide/us-tides
/**
 * Display information about high and low tides obtained from the NOAA Tides and Currents website
 *
 * e.g.
 * `
 *   Threemile Cut entrance, Darien River GA
 *   May 18,2012
 *   02:10 AM 0.7 Low Tide
 *   07:50 AM 6.6 High Tide
 *   02:11 PM 0.2 Low Tide
 *   08:07 PM 7.8 High Tide
 * `
 *
 * @param array $atts- shortcode parameters
 * @return string Result of shortcode
 *
 * 
 * 
 */
function us_tides($atts = NULL)
{
    $station = bw_array_get($atts, "station", "8423745");
    $link = bw_array_get($atts, "link", "y");
    $link = bw_validate_torf($link);
    $date_format = bw_array_get($atts, "date_format", "M d,Y");
    $response = us_load_xml_file($station);
    if ($response) {
        $stationname = $response->stationname;
        $state = $response->state;
        $text = "Tide times and heights for:";
        $text .= " ";
        $text .= $stationname;
        $text .= " ";
        $text .= $state;
        if ($link) {
            alink("stationname", "http://tidesandcurrents.noaa.gov/noaatidepredictions/NOAATidesFacade.jsp?Stationid={$station}", $text);
        } else {
            p($text, "stationname");
        }
        p(bw_format_date(null, $date_format));
        $today = bw_format_date(null, "Y/m/d");
        foreach ($response->data->item as $item) {
            if ($item->date == $today) {
                us_format_item($item);
            }
        }
    }
    return bw_ret();
}
コード例 #2
0
ファイル: listar.php プロジェクト: ET37/Ortega-Productos-ABM
    ?>
            <div name="<?php 
    echo $prod->url;
    ?>
">
                <p><?php 
    echo alink(ver($prod), $prod->nombre);
    ?>
 - <?php 
    echo $prod->precio;
    ?>
</p>
                <p><?php 
    echo $prod->stock;
    ?>
 en stock</p>
                <p>¿<?php 
    echo alink(editar($prod), "Editar");
    ?>
 o <?php 
    echo alink(borrar($prod), "borrar");
    ?>
?</p>
            </div>
            <?php 
}
?>
        </div>
    </body>
</html>
コード例 #3
0
ファイル: oik-blogs.php プロジェクト: bobbingwide/oik-ms
/**
 * Display information about a blog in a particular format
 *
 * 
 */
function bw_display_blog($id, $atts, $content)
{
    $bloginfo = bw_get_bloginfo($id);
    if ($bloginfo) {
        if (is_numeric($id)) {
            $url = get_blogaddress_by_id($id);
        } else {
            $url = get_blogaddress_by_name($id);
        }
        $blog = $bloginfo->blog_id;
        switch_to_blog($blog);
        if ($content) {
            e(bw_do_shortcode($content));
        } else {
            alink(null, $url, $bloginfo->blogname);
        }
        restore_current_blog();
    }
}
コード例 #4
0
			 <?php 
alink("alexandertechnique.png", "Alexander Technique", "http://www.alexandertechnique.com/");
alink("wikipedia.png", "Alexander Technique (wikipedia)", "http://en.wikipedia.org/wiki/Alexander_technique");
alink("abrsm.jpg", "Associated Board of the Royal Schools of Music (ABRSM) - Examinations", "http://de.abrsm.org/en/home");
alink("eltzalmuseum.gif", "Elztal Museum, Waldkirch", "http://www.elztalmuseum.de/");
alink("epta.png", "European Piano Teachers Association", "http://epta-europe.org");
alink("klappe11.jpg", "Klappe 11 Cinema and Arts Festival, Waldkirch", "http://www.klappe11.de/");
alink("musicschulewaldkirch.jpg", "Waldkirch Music School", "http://www.fv-musikschule-waldkirch.de/");
alink("pf.png", "Peter Feuchtwanger - Pianist, Composer, Padagogue", "http://www.peter-feuchtwanger.de/");
alink("pfclub.jpg", "Peter Feuchtwanger Club (Facebook)", "https://www.facebook.com/Peter-Feuchtwanger-Club-195576167160189/");
alink("wikipedia.png", "Peter Feuchtwanger (Wikipedia)", "https://en.wikipedia.org/wiki/Peter_Feuchtwanger");
alink("ram.png", "Royal Academy of Music", "http://www.ram.ac.uk/");
alink("blido.jpg", "Fedra und Stefan Blido", "http://www.blido.de/");
alink("kulturwoche.jpg", "Waldkirch Culture Week", "http://kulturwoche-waldkirch.de/");
alink("wo.jpg", "Waldkirch Organ Foundation", "http://www.waldkircher-orgelstiftung.de/");
alink("fb.jpg", "William Cuthbertson Facebook", "https://www.facebook.com/william.cuthbertson.12");
?>
		<div class="row  rowBorder">
						<div class="col-lg-12">  
				        <?php 
print foot();
?>
                    </div>
                </div>
        </div>        <!-- /#page-content-wrapper -->
    </div>    <!-- /#wrapper -->
	<?php 
print endPage();
?>
</body>
</html>
コード例 #5
0
ファイル: Cody.php プロジェクト: richardkeep/tina4stack
 function codeBuilder()
 {
     $links[] = script(["src" => "https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"]);
     $links[] = script(["src" => "https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.2/jquery-ui.min.js"]);
     $links[] = alink(["rel" => "stylesheet", "href" => "https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.2/themes/smoothness/jquery-ui.css"]);
     $content = $this->ajaxHandler("", "", "ajaxCode", "", "post", false);
     $content .= script("\n        function loadFileCode (aFileName) {\n            ajaxCode ('/cody/loadFile', 'codeArea', {fileName: aFileName});\n        }\n        ");
     $content .= $this->getFileExplorer();
     $content .= div(["id" => "codeArea"], $this->getCodeWindow("1", file_get_contents("index.php")));
     $html = shape(doctype(), html(head(meta(["charset" => "UTF-8"]), title("Code- Online Developer Editor"), $links), body($content)));
     return $html;
 }
コード例 #6
0
ファイル: Maggy.php プロジェクト: richardkeep/tina4stack
 /**
  * The default page template for maggy
  * @param type $title String A title to name the page by
  * @return type Shape A page template with default bootstrap
  */
 function getPageTemplate($title = "Default")
 {
     $html = html(head(title($title), alink(["rel" => "stylesheet", "href" => "https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css"]), alink(["rel" => "stylesheet", "href" => "https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap-theme.min.css"]), alink(["rel" => "stylesheet", "href" => "https://cdnjs.cloudflare.com/ajax/libs/bootstrap-table/1.8.1/bootstrap-table.min.css"])), body(["style" => "padding: 0px 20px 0px", "id" => "content"]));
     return $html;
 }
コード例 #7
0
ファイル: Kim.php プロジェクト: richardkeep/tina4stack
 /**
  * Return default bootstrap page
  *
  */
 function getPageTemplate($title = "Default")
 {
     $html = html(head(title($title), alink(["rel" => "stylesheet", "href" => "https://maxcdn.bootstrapcdn.com/bootswatch/latest/cosmo/bootstrap.min.css"]), alink(["rel" => "stylesheet", "href" => "https://cdnjs.cloudflare.com/ajax/libs/bootstrap-table/1.8.1/bootstrap-table.min.css"]), alink(["rel" => "stylesheet", "href" => "http://jonmiles.github.io/bootstrap-treeview/css/bootstrap-treeview.css"]), script(["src" => "http://code.jquery.com/jquery-2.1.4.min.js"]), script(["src" => "https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"]), script(["src" => "https://cdnjs.cloudflare.com/ajax/libs/bootstrap-table/1.8.1/bootstrap-table.min.js"]), script(["src" => "http://ajax.aspnetcdn.com/ajax/jquery.validate/1.13.1/jquery.validate.min.js"]), script(["src" => "http://ajax.aspnetcdn.com/ajax/jquery.validate/1.13.1/additional-methods.min.js"]), script(["src" => "http://cdnjs.buttflare.com/ajax/libs/interact.js/1.2.4/interact.min.js"]), script(["src" => "//cdn.ckeditor.com/4.5.1/standard/ckeditor.js"])), body(["style" => "padding: 0px 20px 0px"], div(["id" => "content"])));
     return $html;
 }
コード例 #8
0
ファイル: login.php プロジェクト: xusiying/login-register
<?php

session_start();
//全局变量	$_POST接受表单中method为post,$_GET接受表单中method为get的
require_once 'link.php';
$username = $_POST['username'];
//trim 清除字符串两边的空格
//md5 加密算法
$password = trim(md5($_POST['password']));
//	var_dump($username);
//	var_dump($password);
alink('localhost', 'root', '960716', 'alpha');
$sql = "select * from users where username ='******' and password = '******'";
//	echo $sql;
$row = mysql_query($sql);
$resault = mysql_fetch_assoc($row);
if ($row) {
    echo "登录成功";
    $_SESSION['username'] = $username;
    $_SESSION['password'] = $password;
} else {
    echo "登录失败";
}
コード例 #9
0
ファイル: loginHandle.php プロジェクト: elaine96/task
<?php

include 'link.php';
//调用session
session_start();
$name = addslashes(trim($_POST['name']));
//获取表单中的name
$password = md5(addslashes(trim($_POST['password'])));
//单引号 (')双引号 (")反斜杠 (\)NULL  添加反斜杠
//trim去掉左右两边的空格
alink('localhost', 'root', 'zyl19961020', 'elaine');
//使用之前写好的函数连接数据库
//echo $name."-".$password."-".$password1;
$sql = "select * from user where name='{$name}' AND password='******'";
//查询用户的sql语句
$row = mysql_query($sql);
//执行sql语句
$result = mysql_fetch_assoc($row);
//获取查询的数据(数据表第一行)
if ($result) {
    echo "<script language=\"javascript\">";
    echo "alert(\"登录成功!\")";
    echo "</script>";
    echo "<br>";
    $_SESSION['name'] = $name;
    $_SESSION['password'] = $password;
    echo "<script language=\"javascript\">";
    echo "alert(\"欢迎" . $_SESSION['name'] . "\")";
    echo "</script>";
    echo "<br>";
    echo "<a href=\"login.html\">返回登录页面</a><br>";