php页面:
- <input type="text" name="logo" id="logo" size="50" value="<?=$ppdata[pplogo]?>" onclick="$('#logo_div').css('display','')" onblur="$('#logo_div').css('display','none')"> <input type="button" name="logo_upimage" id="logo_upimage" value="上传图片" style="width:60px" onclick="javascript:openwinx('<?=$PHPCMS_PATH?>yp/upload.php?uploadtext=logo','upload','450','350')">
- <div id='logo_div' style='background-color: #fff;border:#006699 solid 1px;position:absolute;z-index:10;padding:5px;display:none;'>
- <img src="<?=$ppdata[pplogo]?>"></div>
html页面:
- <input type="text" name="logo" id="logo" size="50" value="{$company_user_infos[logo]}" onclick="$('#logo_div').css('display','')" onblur="$('#logo_div').css('display','none')"> <input type="button" name="logo_upimage" id="logo_upimage" value="上传图片" style="width:60px" onclick="javascript:openwinx('{PHPCMS_PATH}yp/upload.php?uploadtext=logo','upload','450','350')">
- <div id='logo_div' style='background-color: #fff;border:#006699 solid 1px;position:absolute;z-index:10;padding:5px;display:none;'>
- <img src="{$company_user_infos[logo]}"></div>
自定义类方法及调用,例:/include/system_dim.class.php;
- <?php
- class system_dim
- {
- var $db;
- var $linkage;
- function __construct()
- {
- global $db;
- $this->db = &$db;
- $this->linkage = DB_PRE.'linkage';
- }
- function system_dim()
- {
- $this->__construct();
- }
- function get_linkage_name($linkageid)
- { //开源软件:Vevb.com
- $name=$linkageid;
- $namearry=$this->db->get_one("select * from `$this->linkage` where linkageid=".$linkageid);
- $name =$namearry['name'] ;
- return $name;
- }
- }
- ?>
调用:require_once './include/system_dim.class.php';
$system_dim=new system_dim();
////////////////////////////////////////////////////////////
调用其中方法的位置:$system_dim->方法名称(参数).
新闻热点
疑难解答