program | upload | upload picture <?php
The table structure used by the/******* ********
DROP TABLE IF EXISTS index_news;
CREATE TABLE Index_news (
news_id bigint not NULL auto_increment,
News_date date DEFAULT ' 0000-00-00 ' not NULL,
News_title varchar (m) not NULL,
News_content text,
News_link varchar (100),
Is_new char (1) DEFAULT ' 1 ',
picture_id Int (11),
Picture_side char (1) DEFAULT ' 1 ',
News_show char (1) DEFAULT ' 1 ',
PRIMARY KEY (news_id),
KEY ID (news_id)
);
DROP TABLE IF EXISTS picture;
CREATE TABLE Picture (
ID Int (one) not NULL auto_increment,
The picture blob is not NULL,
Picture_type varchar (m) not NULL,
PRIMARY KEY (ID),
UNIQUE ID (ID)
);
**********************/
Require (".. /include/date.inc.php3 ");
Require (".. /include/config.inc.php3 ");
?>
<! DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 transitional//en" >
<title> Modify Home News information </title>
<script language= "JavaScript" >
<!--
function Mm_findobj (n, D) {//v3.0
var p,i,x; if (!d) d=document; if ((P=n.indexof ("?")) >0&&parent.frames.length) {
D=parent.frames[n.substring (p+1)].document; N=n.substring (0,p);}
if (!) ( X=d[n]) &&d.all) x=d.all[n]; for (i=0;! x&&i<d.forms.length;i++) X=d.forms[i][n];
for (i=0;! x&&d.layers&&i<d.layers.length;i++) X=mm_findobj (n,d.layers[i].document); return x;
}
function Mm_validateform () {//v3.0
var i,p,q,nm,test,num,min,max,errors= ', args=mm_validateform.arguments;
For (i=0 i< (args.length-2); i+=3) {test=args[i+2]; obj_name=args[i+1]; Val=mm_findobj (args[i));
if (val) {nm=val.name; if (val=val.value)!= "") {
if (Test.indexof (' Isemail ')!=-1) {p=val.indexof (' @ ');
if (p<1 | | p== (VAL.LENGTH-1)) errors+= '-' +obj_name+ ' must be an e-mail address. \ n ';
else if (test!= ' R ') {num = parsefloat (val);
if (val!= ' +num) errors+= '-' +obj_name+ ' must be a number. \ n ';
if (Test.indexof (' InRange ')!=-1) {P=test.indexof (': ');
Min=test.substring (8,P); Max=test.substring (p+1);
if (Num<min | | max<num) errors+= '-' +obj_name+ ' must be a number between ' +min+ ' and ' +max+ '. \ n ';
}} else if (Test.charat (0) = = ' R ') errors + = '-' +obj_name+ ' must be entered. \ n '; }
} if (Errors) alert (' Input data error: \ n ' +errors ');
Document. Mm_returnvalue = (Errors = = ");
}
-->
</script>
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.