我的威客站:www.688d.com 大家可以测试一下 注册一个会员
发任务,图片和发文件都会出错误!到此文件post_task_review.php 任务描述中的图片右面会出现 ">的符号!图片可以显示
但是发布成功后 在去浏览 图片就不显示了,看下图片的地址 居然是 网址.com/</div
/后面按说应该是upload/日期/文件.jpg
居然是</div 我用的是 RAICO 的程序、
我把整站程序给大家!下载地址:www.688d.com/vk.rar 不大刚900K
还有个别的PHP
post_task_review.php 文件
<?php /*
[RAICO] (C)2006-2007 Raico Studio.
This is a shareware, please keep the information Vision: 1.1 beta
Date: 2007/01/02
*/
require_once './include/inc_common.php';
require_once './language/'.$language.'/main_lang.php';
require_once './language/'.$language.'/notice_lang.php';
require_once "./include/inc_checklogin.php";
if ($_POST["addsubmit"]!=""){
connect($dbhost, $dbuser, $dbpw, $dbname);
$taskerr=0;
$str_sys="";
$str_kind="<img src=./images/check_right.gif width=13 height=13 border=0>";
$str_subject="<img src=./images/check_right.gif width=13 height=13 border=0>";
$str_area="<img src=./images/check_right.gif width=13 height=13 border=0>";
$str_money="<img src=./images/check_right.gif width=13 height=13 border=0>";
$str_starttime="<img src=./images/check_right.gif width=13 height=13 border=0>";
$str_endtime="<img src=./images/check_right.gif width=13 height=13 border=0>";
$str_desc="";
$str_minimoney="";
$vkind_name=safestr($_POST[vkind_name]);
$kind_id=safestr($_POST[kind_id]);
$task_money=safestr($_POST[task_money]);
$area_id=safestr($_POST[area_id]);
$task_subject=str_replace('\"','"',safestr($_POST[task_subject]));
$task_starttime=$_POST[task_starttime];
$task_endday=safestr($_POST[task_endday]);
$task_endtime=date("Y-m-d H:i:s",DateAdd ("d", $task_endday, cdate($task_starttime)));
$task_requestmoney=0;
$task_desc=str_replace('\"','"',$_POST[task_desc]);
$result=mysql_query("SELECT kind_money,kind_minmoney from {$tablepre}kind where kind_id=$kind_id") or die (执行查询失败!);
if ($row=mysql_fetch_array($result)){
$kind_money=$row[kind_money];
$kind_minmoney=$row[kind_minmoney];
$task_usermoney=$kind_money;
}else{
$task_usermoney="0.8";
$kind_minmoney="0";
}
if ($kind_minmoney!="0"){
if ($task_money<$kind_minmoney){
$str_minimoney="<img src=./images/check_error.gif width=13 height=13 border=0> <font color=red>本类任务金额不得低于".$kind_minmoney."元(¥)!</font>";
$taskerr=$taskerr+1;
}
}
$result=mysql_query("SELECT tmp_city.area_name AS city_name, tmp_state.area_name AS state_name,tmp_state.area_id AS state_id FROM {$tablepre}area AS tmp_city, {$tablepre}area AS tmp_state WHERE tmp_city.area_id =$area_id AND tmp_city.state_id = tmp_state.area_id") or die (执行查询失败!);
if ($row=mysql_fetch_array($result)){
$city_name=$row[city_name];
$state_name=$row[state_name];
$state_id=$row[state_id];
}else{
$taskerr=$taskerr+1;
echo ErrWindow("城市不存在!");
}
if ($area_id!="0"){
$str_area="<img src=./images/notice.gif width=13 height=13 border=0> <font color=blue>注意:</font>您设置了任务只能同城用户参与,如果需要取消此限制,请选择不限区域";
}
$result=mysql_query("SELECT COALESCE(sum(mn_value),0) AS user_summoney FROM `{$tablepre}money` WHERE user_id=".$_SESSION["{$tablepre}user_id"]." and mn_type=1 and mn_state=1") or die (执行查询失败!);
$row=mysql_fetch_array($result);
if ($task_money>$row[user_summoney]){
$task_requestmoney=round($task_money-$row[user_summoney],2);
$str_money="<img src=./images/notice.gif width=13 height=13 border=0> ";
$str_money=$str_money."<font color=blue>注意:</font>您目前的帐户只有".$row[user_summoney]."元(¥),不够发布此任务,在您提交任务后请及时充值(冲值金额不少于".$task_requestmoney."元),以确保任务成功提交<br><font color=blue>系统将引导您完成支付。</font>";
}
//echo DateDiff ("h", cdate(GetNow($site_timezone)),cdate($task_starttime));
if (DateDiff ("h", cdate(GetNow($site_timezone)),cdate($task_starttime))<-1){
//任务开始时间不得比现在晚一小时以上,请调整任务开始时间
$str_starttime="<img src=./images/check_error.gif width=13 height=13 border=0> <font color=red>任务开始时间不得比现在晚一小时以上,请调整任务开始时间</font>";
$taskerr=$taskerr+1;
}
if (strlen($task_desc)<10){
$str_desc="<img src=./images/check_error.gif width=13 height=13 border=0> <font color=red>任务描述不够详细,可能无法了解您的详细需求</font>";
$taskerr=$taskerr+1;
}
if ($taskerr>0){
$str_sys="<font color=red>请注意以下错误信息,并返回修改</font>";
}
close();
}
require_once './inc_header.php';
require_once './inc_headmenu.php';
?>
<!------Body Start-------->
<table width="100%" border="0" cellspacing="0" cellpadding="0" id="body">
<tr>
<td> </td>
</tr>
<tr>
<td>
<table width="98%" border="0" align="center" cellpadding="0" cellspacing="8">
<tr>
<td align="center" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="1" class="TabMain">
<tr>
<td height="28" class="TabHead"><strong>发布新任务</strong> <?echo $str_sys;?></td>
</tr>
<form method="post" name="form1" action="post_task_exec.php">
<input name="state_id" id="state_id" type="hidden" value="<?echo $state_id;?>">
<tr>
<td class="TabBody"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr bgcolor="#bbe9ff" height="1">
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td width="175" bgcolor="#ffffd9"> <font color="#92a05a">类别:</font></td>
<td width="300" bgcolor="#ffffd9"> </td>
<td bgcolor="#ffffd9"> </td>
</tr>
<tr bgcolor="#dedeb8" height="1">
<td></td>
<td></td>
<td></td>
</tr>
<input name="vkind_name" id="vkind_name" type="hidden" value="<?echo $vkind_name;?>">
<input name="kind_id" id="kind_id" type="hidden" value="<?echo $kind_id;?>">
<tr>
<td bgcolor="#F5FBFF"> </td>
<td colspan="2" align="center">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="10"> </td>
<td><?echo $str_minimoney;?><br><table width="570" border="0" cellpadding="5" cellspacing="1" class="TabMain">
<tr>
<td bgcolor="#FFFFFF">您当前选择的是:<span id="navkind" style="font-weight:bold;color:blue;"><?echo $vkind_name;?></span> </td>
</tr>
</table></td>
</tr>
</table><br> </td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr bgcolor="#dedeb8" height="1">
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td width="175" bgcolor="#ffffd9"> <font color="#92a05a">任务信息:</font></td>
<td width="300" bgcolor="#ffffd9"> </td>
<td bgcolor="#ffffd9"> </td>
</tr>
<tr bgcolor="#dedeb8" height="1">
<td></td>
<td></td>
<td></td>
</tr>
<tr height="25">
<td width="175" height="30" bgcolor="#F5FBFF"> <strong>任务名称</strong></td>
<td>
<span id="navkind" style="font-weight:bold;color:blue;"><?echo $task_subject;?></span>
<input name="task_subject" type="hidden" value="<?echo $task_subject;?>"></td>
<td><?echo $str_subject;?></td>
</tr>
<tr bgcolor="#bbe9ff" height="1">
<td width="175"></td>
<td></td>
<td></td>
</tr>
<tr height="25">
<td width="175" height="30" bgcolor="#F5FBFF"> <strong>开始时间</strong></td>
<td>
<span id="navkind" style="font-weight:bold;color:blue;"><?echo $task_starttime;?></span>
<input name="task_starttime" type="hidden" value="<?echo $task_starttime;?>">
</td>
<td><?echo $str_starttime;?></td>
</tr>
<tr bgcolor="#bbe9ff" height="1">
<td width="175"></td>
<td></td>
<td></td>
</tr>
<tr height="25">
<td width="175" height="30" bgcolor="#F5FBFF"> <strong>任务周期</strong></td>
<td>
<span id="navkind" style="font-weight:bold;color:blue;"><?echo $task_endday;?>天</span>
<input name="task_endday" type="hidden" value="<?echo $task_endday;?>">
<input name="task_endtime" type="hidden" value="<?echo $task_endtime;?>">
于<?echo $task_endtime;?>结束
</td>
<td><?echo $str_endtime;?></td>
</tr>
<tr bgcolor="#bbe9ff" height="1">
<td width="175"></td>
<td></td>
<td></td>
</tr>
<tr height="25">
<td width="175" height="30" bgcolor="#F5FBFF"> <strong>参与者所在地区</strong></td>
<td> <span id="navkind" style="font-weight:bold;color:blue;"><?echo $state_name."-".$city_name;?></span>
<input name="area_id" type="hidden" value="<?echo $area_id;?>">
<input name="state_id" type="hidden" value="<?echo $state_id;?>">
</td>
<td><?echo $str_area;?></td>
</tr>
<tr bgcolor="#bbe9ff" height="1">
<td width="175"></td>
<td></td>
<td></td>
</tr>
<tr height="25">
<td width="175" bgcolor="#F5FBFF"> <strong>任务金额</strong></td>
<td>
<span id="navkind" style="font-weight:bold;color:blue;"><?echo $task_money;?>元(¥) </span>
<input name="task_money" type="hidden" value="<?echo $task_money;?>">
<input name="task_usermoney" type="hidden" value="<?echo $task_usermoney;?>">
<input name="task_requestmoney" type="hidden" value="<?echo $task_requestmoney;?>">
</td>
<td><?echo $str_money;?></td>
</tr>
<tr bgcolor="#bbe9ff" height="1">
<td width="175"></td>
<td></td>
<td></td>
</tr>
<tr height="25">
<td width="175" bgcolor="#F5FBFF"> <strong>任务描述</strong></td>
<td colspan="2"><INPUT type="hidden" name="task_desc" value="<? echo $task_desc;?>">
<?echo $str_desc;?>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="10"> </td>
<td><br>
<table width="570" border="0" cellpadding="5" cellspacing="1" class="TabMain">
<tr>
<td bgcolor="#FFFFFF">
<div><?=str_replace('"','"',$task_desc)?></div></td>
</tr>
</table></td>
</tr>
</table><br></td>
</tr>
<tr bgcolor="#bbe9ff" height="1">
<td width="175"></td>
<td></td>
<td></td>
</tr>
<tr>
<td width="175" height="30"></td>
<td>
<input name="isdraf" type="checkbox" id="isdraf" value="1" />
仅保存到草稿箱,暂发布任务此任务</td>
<td></td>
</tr>
<tr bgcolor="#bbe9ff" height="1">
<td width="175"></td>
<td></td>
<td></td>
</tr>
<tr>
<td height="50" colspan="3" align="center">
<input name="addsubmit" type="submit" class="Btn" id="addsubmit" value="确定提交" <?if ($taskerr>0){echo "disabled=disabled";}?>>
<input name="midisubmit" type="submit" class="Btn" id="midisubmit" value="返回修改" onClick="form1.action='post_task.php';">
</td>
</tr>
</table>
</td>
</tr></form>
</table></td>
</tr>
</table>
</td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td height="1" bgcolor="#7ac4ea"><img src="./images/clear.gif" width="1004" height="1" border="0"></td>
</tr>
</table>
<!------Body End-------->
<? require_once './inc_footmenu.php';
require_once './inc_footer.php';?>
[此贴子已经被作者于2007-5-16 14:10:16编辑过]