| 域名空间 下载中心 社区论坛 信息公告 my小屋 |
![]() |
联系我们 设为首页 加入收藏 |
|
首页 | 新闻资讯 | 编程开发 | 网页设计 | 图形图象 | 网络媒体 | 网站模板 | 数 据 库 | 投稿 论坛 | 操作系统 | 系统优化 | 网络安全 | 黑客技术 | 硬件学堂 | 硬件报价 | 服 务 器 | 地图 专题 | 应用软件 | 聊天通讯 | q q 专栏 | 建站经验 | 在线工具 | 站长club | 注 册 表 | 旧版 社会 | 游戏娱乐 | 设计欣赏 | 疑难解答 | 社区论坛 | 韩国素材 | 素材图库 | 广告服务 | 服务 |
| 新版上线![旧版] | |||||
注:打开慢时请稍等
请帮忙解决,图随机上传,不限量,定位置,与文章进库同步完成http://www.iyit.net 日期:2006-10-6 15:12:55 来源:iyit.net收集 点击: |
发布文章、或者新闻、或者产品说明,这一类的图片、文字均有的资料,要求的是,根据文章的需要随时插入图片、并且由其自己指定对齐方式。文字进库,图片上传,理论上是采取 ubb 跟 js 配合,请各位不吝赐教,本人给分绝对爽快。 ================================================================ csdn 论坛助手 ver 1.0 b0402提供下载。 改进了很多,功能完备! ★ 浏览帖子速度极快![建议系统使用ie5.5以上]。 ★ 多种帖子实现界面。 ★ 保存帖子到本地[html格式]★ 监视您关注帖子的回复更新。 ★ 可以直接发贴、回复帖子★ 采用xml接口,可以一次性显示4页帖子,同时支持自定义每次显示帖子数量。可以浏览历史记录! ★ 支持在线检测程序升级情况,可及时获得程序更新的信息。 ★★ 签名 ● 可以在您的每个帖子的后面自动加上一个自己设计的签名哟。 http://www.chinaok.net/csdn/csdn.zip http://www.chinaok.net/csdn/csdn.rar http://www.chinaok.net/csdn/csdn.exe [自解压] --------------------------------------------------------------- adddata.php文件的代码: <html> <head> <title>增加数据</title> <meta http-equiv="content-type" content="text/html; charset=gb2312"> </head> <body bgcolor="#ffffff"> <? @$link=mysql_pconnect("localhost","root","rpass007") or die ("登陆服务器失败,请稍候再试"); mysql_select_db($db); $date=date('y-m-d h:i:s'); if((($db=="foltyx"&&$tb=="wlg_master") ¦ ¦($db=="foljrbd"&&$tb=="tpxw")) ¦ ¦($db=="foljrxt"&&($tb=="shpx" ¦ ¦$tb=="tswl")))//for tyx jrbd jrxt { if(chop($imagein)!="none") { $picuppath="/home/fol/php/admin/"; //define up pic path $dirname="picup"; if(!(chdir($picuppath))) { die("can not change path!"); } if(!(file_exists("$dirname"))) { if(!(mkdir($dirname,0777))) die("can not make dir!"); if(!(chmod($dirname,0777))) die("can not change dir mode!"); } if(!(chdir($dirname))) die("can not change dir!"); $dirpath=$dirname."/"; $imagepath=$picuppath.$dirpath; //path end $image=""; $imagename=""; $imagetype=""; $nowtime=time(); $imagename=$imagein_name ; //old pic name for db $imagetail=strrchr($imagename,"."); //get pic name type name $imagename=$nowtime.$imagetail; if(!copy($imagein,$imagepath.$imagename)) die("up pic false"); //up pic end $size=getimagesize($imagename); //get size array,for now in uppic,so just imagename else dirpaht $imgwidth=$size[0]; $imgheight=$size[1]; $imgsize=$size[3]; unlink($imagename); //delete pic in remote $image=base64_encode(fread(fopen($imagein,"r"),10000000)); //inset db begin $imagetype=$imagein_type ; $imgtype=$imagetype; unlink($imagein); $imgoldname=$imagename; $imgname=$imagename; $imgbody=$image; if($db=="foljrbd"&&tb=="tpxw"){//there is no summary in tpxw of foljrbd,so ... $result =mysql_query("insert into $tb (title,content,date,author,origin,imgoldname,imgtype,imgname,imgwidth,imgheight,imgsize,imgbody) values('$title','$content','$date','$author','$origin','$imgoldname','$imgtype','$imgname','$imgwidth','$imgheight','$imgsize','$imgbody')",$link); } else{//tpxw of foljrbd $result =mysql_query("insert into $tb (title,summary,content,date,author,origin,imgoldname,imgtype,imgname,imgwidth,imgheight,imgsize,imgbody) values('$title','$summary','$content','$date','$author','$origin','$imgoldname','$imgtype','$imgname','$imgwidth','$imgheight','$imgsize','$imgbody')",$link); } } else die("请上传图片"); }//end of pic or pic with no summary elseif($db=="foljrbd"&&$tb=="cjzt"){//beggin of cjzt of fol jrbd $result =mysql_query("insert into $tb (title,content,date,author,origin,topic) values('$title','$content','$date','$author','$origin','$topic')",$link); }//end of cjzt of fol jrbd elseif($db=="foljrsx"&&$tb=="pshzl")//for jrsx { if(chop($imagein)!="none") { $picuppath="/home/fol/php/jrsx/"; //define up pic path $dirname="article"; if(!(chdir($picuppath))) { die("can not change path!"); } if(!(file_exists("$dirname"))) { if(!(mkdir($dirname,0777))) die("can not make dir!"); if(!(chmod($dirname,0777))) die("can not change dir mode!"); } if(!(chdir($dirname))) die("can not change dir!"); $dirpath=$dirname."/"; $imagepath=$picuppath.$dirpath; //path end $image=""; $imagename=""; $imagetype=""; $nowtime=time(); $imagename=$imagein_name ; //old pic name for db $imagetail=strrchr($imagename,"."); //get pic name type name $imagename=$nowtime.$imagetail; if(!copy($imagein,$imagepath.$imagename)) die("up pic false"); //up pic end //unlink($imagename); //delete pic in remote //$image=base64_encode(fread(fopen($imagein,"r"),10000000)); //inset db begin $imagetype=$imagein_type ; $imgtype=$imagetype; unlink($imagein); $imgoldname=$imagename; $imgname=$imagename; $imgbody=$image; $result =mysql_query("insert into $tb (title,content,date,author,origin,artcloldname,artcltype,artclname) values('$title','$content','$date','$author','$origin','$imgoldname','$imgtype','$imgname')",$link); } else die("请上传论文"); }//end of art elseif($db=="foljrxt"&&($tb=="ztjz" ¦ ¦$tb=="alfx")){ $result =mysql_query("insert into $tb (title,summary,content,date,author,origin) values('$title','$summary','$content','$date','$author','$origin')",$link); } else{ $result =mysql_query("insert into $tb (title,content,date,author,origin) values('$title','$content','$date','$author','$origin')",$link); } if (mysql_affected_rows()==1) { ?> 添加成功,请返回! <p><a href="add.php?db=<? echo $db ?>&tb=<? echo $tb ?>">返回</a> </p> <? } else { ?> 添加不成功,请稍候再试! <p><a href="add.php?db=<? echo $db ?>&tb=<? echo $tb ?>">返回</a> </p> <? } ?> </body> </html> 编辑:黑鹰 [发送给好友] [打印本页] [关闭窗口] [返回顶部] 上一篇:一个不懂的问题是?<input type="file" 。。。。。 下一篇:怎么求两个时间如2002-05-09 到2002-11-30这两个时期相差的天数? 转载请注明来源:www.iyit.net 特别声明: 本站除部分特别声明禁止转载的专稿外的其他文章可以自由转载,但请务必注明出处和原始作者。文章版权归文章原始作者所有。对于被本站转载文章的个人和网站,我们表示深深的谢意。如果本站转载的文章有版权问题请联系编辑人员,我们尽快予以更正。 |
| 相关文章 | ||||
| 友情链接 | ||||||
| 设置首 页 - 版权声明 - 广告服务 - 关于我们 - 联系我们 - 友情连接 |
| |||||||