欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

純php打造的tab選項(xiàng)卡效果代碼(不用js)

 更新時間:2010年12月29日 11:14:44   作者:  
用php實(shí)現(xiàn)的tab選項(xiàng)卡效果,根據(jù)get判斷,獲取get生成css與對應(yīng)的內(nèi)容,當(dāng)然效率肯定沒有靜態(tài)的好,這里給出的思路與方法。
1.根據(jù)get判斷,獲取get生成css
復(fù)制代碼 代碼如下:

<style type="text/css">
<?php
if(!isset($_GET['city_id']))
{
$city_id = 12;
}
else
{
$city_id = $_GET['city_id'];
}
echo '.a'.$city_id.'
{
color:red;
}
';
for($i=12;$i<=16;$i++)
{
if($i != $city_id)
{
if ($i != 12 )
{
echo '.list'.$i.'{
background-image:url("image/style/bg.gif");
}';
}
else
{
echo '.list'.$i.'
{
background-image:url("image/style/left_bg.gif");
}
';
}
}
else
{
if($city_id != 12)
{
echo '.list'.$city_id.'
{
background-image:url("image/style/on.gif");
}
';
}else
{
echo '.list'.$city_id.'{
background-image:url("image/style/recuit_title.gif");
}';
}
}
}
?>
</style>

2.點(diǎn)擊的時候,就可以打開鏈接
復(fù)制代碼 代碼如下:

<div class="recuit_title" >
<ul id="recuit_li">
<li class="list12"><a class="a12" href="test.php?city_id=12">北京</a></li>
<?php
include_once ("config/db.inc.php");
$recuit_city_select = "select * from cdb_plugins_city where city_id in(13,14,15,16)";
$recuit_city_query = mysql_query ( $recuit_city_select );
while ( $recuit_city_row = mysql_fetch_assoc ( $recuit_city_query ) ) {
$cid = $recuit_city_row['city_id'];
echo '<li class="list'.$recuit_city_row['city_id'].'" ><a class="a'.$recuit_city_row['city_id'].'" href="test.php?city_id=' . $recuit_city_row ['city_id'] . '">' . $recuit_city_row ['city_name'] . '</a></li>';
}
?>
</ul>
<span class="more_recuit_info">
<a href="../job.php?action=recuit_list&cid=12" onClick="parent.showWindow('recuit_list',this.href);return false;">更多招募信息</a>
</span>
</div>
<div class="recuit_content">
<table width="100%">
<?php
if(!$_GET['city_id'])
{

$recuit_content_select = "select * from cdb_plugins_recuit where city_id= 12 limit 0,8";
$recuit_content_query = mysql_query($recuit_content_select);
while($recuit_content_row = mysql_fetch_assoc($recuit_content_query))
{
echo '<tr height="25">
<td>
<a onclick="parent.showWindow('.'\'recuit_info\','.'this.href'.');return false;"'.'" href="../job.php?action=recuit_info&recuit_id='.$recuit_content_row['recuit_id'].'">'.$recuit_content_row['recuit_name'].'</a>
</td>
<td width="80" align="right" style="color:#0080ff;font-size:12px;">
'.$recuit_content_row['username'].'&nbsp;&nbsp;
</td>
</tr>';
}
}
else
{
$recuit_content_select = "select * from cdb_plugins_recuit where city_id={$_GET['city_id']} limit 0,10";
$recuit_content_query = mysql_query($recuit_content_select);
while($recuit_content_row = mysql_fetch_assoc($recuit_content_query))
{
echo '<tr>
<td><a onclick="parent.showWindow('.'\'recuit_info\','.'this.href'.');return false;"'.'" href="../job.php?action=recuit_info&recuit_id='.$recuit_content_row['recuit_id'].'">'.$recuit_content_row['recuit_name'].'</a></td>
<td width="80" align="right" style="color:#0080ff;font-size:12px;">'.$recuit_content_row['username'].'&nbsp;&nbsp;</td>
</tr>';
}
}
?>
</table>
</div>
<div class="recuit_footer">
<?php
include_once ("../include/common.inc.php");
$recuit_query = mysql_query("select * from cdb_plugins_recuit_userinfo where uid=$discuz_uid");
$recuit_rows = mysql_fetch_assoc($recuit_query);
if($recuit_rows['uid'] == '')
{
echo '<a href="../job.php?action=recuit" onclick="parent.showWindow('.'\'recuit\''.',this.href);return false;"><img src="image/style/recuit_frm_input.gif" border="0" /></a>&nbsp;&nbsp;';
}
else
{
echo '<a href="../job.php?action=edit_recuit" onclick="parent.showWindow('.'\'edit_recuit\''.',this.href);return false;"><img src="image/style/edit_recuit.gif" border="0"/><a>&nbsp;&nbsp;';
}
?>
</div>

相關(guān)文章

  • eaglephp使用微信api接口開發(fā)微信框架

    eaglephp使用微信api接口開發(fā)微信框架

    EaglePHP框架開發(fā)微信5.0的API接口,包含微信5.0 API基礎(chǔ)接口、自定義菜單、高級接口,包括如下接收用戶消息、向用戶回復(fù)消息、會話界面自定義菜單、語音識別、客服接口等功能
    2014-01-01
  • Codeigniter里的無刷新上傳的實(shí)現(xiàn)代碼

    Codeigniter里的無刷新上傳的實(shí)現(xiàn)代碼

    這篇文章主要介紹了Codeigniter里的無刷新上傳的實(shí)現(xiàn)代碼,文中通過示例代碼介紹的非常詳細(xì),對大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價值,需要的朋友們下面隨著小編來一起學(xué)習(xí)學(xué)習(xí)吧
    2019-04-04
  • php實(shí)現(xiàn)的mongodb操作類

    php實(shí)現(xiàn)的mongodb操作類

    說到php連mongoDB,不得不先介紹一下php的官方手冊,網(wǎng)址在:http://us.php.net/manual/en/book.mongo.php,接下來給大家分享一個本人常用的MONGODB的操作類,詳見的數(shù)據(jù)庫操作都有了,小伙伴可以參考下。
    2015-05-05
  • Laravel框架實(shí)現(xiàn)調(diào)用百度翻譯API功能示例

    Laravel框架實(shí)現(xiàn)調(diào)用百度翻譯API功能示例

    這篇文章主要介紹了Laravel框架實(shí)現(xiàn)調(diào)用百度翻譯API功能,結(jié)合實(shí)例形式分析了基于Laravel框架的百度翻譯API調(diào)用相關(guān)操作技巧,需要的朋友可以參考下
    2019-05-05
  • PHP按行讀取、處理較大CSV文件的代碼實(shí)例

    PHP按行讀取、處理較大CSV文件的代碼實(shí)例

    這篇文章主要介紹了PHP按行讀取、處理較大CSV文件的代碼實(shí)例,需要的朋友可以參考下
    2014-04-04
  • php實(shí)現(xiàn)生成驗(yàn)證碼實(shí)例分享

    php實(shí)現(xiàn)生成驗(yàn)證碼實(shí)例分享

    由于注冊的時候常常會用到注冊碼來防止機(jī)器惡意注冊,這里我發(fā)表一個產(chǎn)生圖片驗(yàn)證碼的基本圖像,很簡陋,有需要的小伙伴可以參考下
    2016-04-04
  • PHP調(diào)用wsdl文件類型的接口代碼分享

    PHP調(diào)用wsdl文件類型的接口代碼分享

    本文給大家分享了一個PHP調(diào)用wsdl文件類型的接口代碼,非常的簡單也很實(shí)用,有相關(guān)需求的小伙伴們可以直接拿去用的。
    2014-11-11
  • 在Mac OS上搭建Nginx+PHP+MySQL開發(fā)環(huán)境的教程

    在Mac OS上搭建Nginx+PHP+MySQL開發(fā)環(huán)境的教程

    這篇文章主要介紹了在Mac OS上安裝配置Nginx+PHP+MySQL開發(fā)環(huán)境的教程,雖然Mac自帶PHP,但還是要注意一下php-fpm報錯問題的發(fā)生,需要的朋友可以參考下
    2015-12-12
  • PHP 根據(jù)IP地址控制訪問的代碼

    PHP 根據(jù)IP地址控制訪問的代碼

    有時需要根據(jù) IP 地址控制訪問,以限制或引導(dǎo)某些訪問請求。比如允許局域網(wǎng)段中的訪客正常訪問,但禁止外網(wǎng)訪問。芒果簡單介紹用 PHP 腳本實(shí)現(xiàn)此功能的方法。
    2010-04-04
  • PHP獲取用戶客戶端真實(shí)IP的解決方案

    PHP獲取用戶客戶端真實(shí)IP的解決方案

    獲取客戶端ip其實(shí)不是個簡單的活兒,因?yàn)榇嬖贗p欺騙,和代理問題,所以獲取客戶端的IP的真實(shí)性會打折扣的,不能百分百準(zhǔn)確.但是我們盡量使用比較完善的方法獲取客戶的ip,下面小編給大家分享PHP獲取用戶客戶端真實(shí)IP的方法,一起看看吧
    2016-10-10

最新評論