按照你最新的改了基本没错了
不过三楼的修改“金钱,积分,一起加”
- $todaypt=mktime(0,0,0,gmdate("m",$timer),gmdate("d",$timer),gmdate("Y",$timer));
复制代码
这句在积分那里用了,金钱那里就不要用了吧,不然我估计会出错误提示
还有这里
- $timer=$timestamp + $timeoffset * 3600;
- $todaypt=mktime(0,0,0,gmdate("m",$timer),gmdate("d",$timer),gmdate("Y",$timer));
- if($todaypt==$post['thisday']){
- $addcread=0;
- $addmoney=0;
- if($post['todaysum'] > 20 && $post['todaysum'] <=50)
- {$addcread = 1;
- $addmoney=3;
- }
- elseif($post['todaysum'] >50 && $post['todaysum'] <=80)
- {$addcread = 2;
- $addmoney=5;
- }
- elseif($post['todaysum'] >80)
- {$addcread = 3;
- $addmoney=10;
- }
- $addcread1=$addcread+$postcredits;
- $addmoney1=$addmoney+2;
- $addmoney2=$addmoney+1;
- $addcread2=$addcread+$replycredits;
- $post['todaysum']=$post['todaysum'].",";
- $post['todayn']='<a name="" title="下一发表的主题将得: '.$addcread1.' 个积分和 '.$addmoney1.' 个金钱">+'.$addcread1.'</a>,';
- $post['todayr']='<a name="" title="下一回复的主题将得: '.$addcread2.' 个积分和 '.$addmoney2.' 个金钱">+'.$addcread2.'</a>';}
- else
- {
- $post['todaysum']='<font color=blue>暂未发贴</blue>';
- }
复制代码
我是把他改为:
- $timer=$timestamp + $timeoffset * 3600;
- $todaypt=mktime(0,0,0,gmdate("m",$timer),gmdate("d",$timer),gmdate("Y",$timer));
- $addcread=0;
- $addmoney=0;
- if($todaypt==$post['thisday']){
- if($post['todaysum'] > 20 && $post['todaysum'] <=50)
- {$addcread = 1;
- $addmoney=2;
- }
- elseif($post['todaysum'] >50 && $post['todaysum'] <=100)
- {$addcread = 2;
- $addmoney=5;
- }
- elseif($post['todaysum'] >100)
- {$addcread = 3;
- $addmoney=10;
- }
- $addcread1=$addcread+$postcredits;
- $addmoney1=$addmoney+5;//这里按照自己设定的发帖加钱数改
- $addmoney2=$addmoney+1;//这里按照自己设定的回帖加钱数改
- $addcread2=$addcread+$replycredits;
- $post['todaysum']=$post['todaysum'].",";
- $post['todayn']='<a name="" title="下一发表的主题将得: '.$addcread1.' 个积分和 '.$addmoney1.' 个金钱">+'.$addcread1.'</a>,';
- $post['todayr']='<a name="" title="下一回复的主题将得: '.$addcread2.' 个积分和 '.$addmoney2.' 个金钱">+'.$addcread2.'</a>';}
- else
- {
- $addcread1=$addcread+$postcredits;
- $addmoney1=$addmoney+5;//这里按照自己设定的发帖加钱数改
- $addmoney2=$addmoney+1;//这里按照自己设定的回帖加钱数改
- $addcread2=$addcread+$replycredits;
- $post['todaysum']='<font color=blue>暂未发贴,</font>';
- $post['todayn']='<a name="" title="下一发表的主题将得: '.$addcread1.' 个积分和 '.$addmoney1.' 个金钱">+'.$addcread1.'</a>,';
- $post['todayr']='<a name="" title="下一回复的主题将得: '.$addcread2.' 个积分和 '.$addmoney2.' 个金钱">+'.$addcread2.'</a>';
- }
复制代码
我想这样比较合理。。而且也不会出现暂未发帖后面跟两个逗号
[ 本帖最后由 wydgm 于 2005-8-26 08:56 编辑 ] |