这套程序是朋友花了300元定做的。资料完善度加诚信度,绝对是UCH网上没有的资源。
---------------------------------------------------------------
1,执行sql.sql
2,在admin/tpl中的文件space_manage.htm中的
<tr><th>经验值</th><td><input type="text" class="t_input" name="experience" value="$member[experience]" size="10"></td></tr>
后面添加
<tr>
<th>诚信度</th>
<td>
<!--{eval $start=$member[satisfaction]?$member[satisfaction]:1;}-->
<input name='satisfaction' id='satisfactionid' value='11' type="text" style="display:none;">
<SCRIPT LANGUAGE="JavaScript">
<!--
var nowindex = $start; //默认几个星
var startnum = 9; //星的个数
var tmp = new Array('1','2','3','4','5','6','7','8','9');
var star0="image/star5.png";
var star1="image/star4.png";
function _$(id)
{
return document.getElementById(id);
}
function setstar(index)
{
_$("startip").innerHTML=tmp[index-1];
for(var i=1;i<=index;i++){
_$("s"+i).src=star1;
_$("s"+i).style.cursor="hand";
}
for(var i=(index+1);i<=startnum;i++){
_$("s"+i).src=star0;
_$("s"+i).style.cursor="hand";
}
}
function initstar()
{
for(var i=1;i<=startnum;i++){
document.write('<img id="s'+i+'" title="'+i+'星" src="'+star0+'"/>');
}
document.write('<span id="startip" style=\"color: #DF0101;padding-left: 10px;\"><\/span>');
setstar(nowindex)
}
function clickstar(index)
{
//alert(index);
nowindex=index;
document.getElementById("satisfactionid").value=index;
//alert(ssid);
}
//-->
</SCRIPT>
<SCRIPT LANGUAGE="JavaScript">
initstar();
</SCRIPT>
</td>
</tr>
3,admin/admincp_space.php中的
$setarr = array(
'addsize' => intval($_POST['addsize'])*1024*1024,
'credit'=>intval($_POST['credit']),
'experience'=>intval($_POST['experience']),
);
修改成
$setarr = array(
'addsize' => intval($_POST['addsize'])*1024*1024,
'credit'=>intval($_POST['credit']),
'experience'=>intval($_POST['experience']),
'satisfaction'=>intval($_POST['satisfaction']),
);
4,template/default/space_feed.htm
中的
<!--{template header}-->
下面添加
<script type="text/javascript" src="lib/prototype.js"></script>
<!-- jsProgressBarHandler core -->
<script type="text/javascript" src="lib/jsProgressBarHandler.js"></script>
<link rel="stylesheet" type="text/css" href="lib/jsProgressBarHandler.css" media="screen" />
<style type = "text/css">
#demo {
margin : 0 auto;
width:100%;
}
#demo .extra {
padding-left:30px;
}
#demo .options {
padding-left:10px;
}
#demo .getOption {
padding-left:0px;
padding-right:0px;
}
</style>
在程序
已有 $space[viewnum] 人次访问, $space[credit] 个积分, $space[experience] 个经验<br>下面添加
诚信度starlevel <br>资料完善度:
<span id="demo">
<span class="progressBar percentImage1" id="element1">$degree</span>
</span>
5,source/space_feed.php的
//实名处理
realname_get();
//feed合并
$list = array();下面添加
//诚信度
$starlevel="";
for($i=1;$i<=9;$i++){
if($i<=$space["satisfaction"]){
$starlevel.="<img src='image/star4.png'>";
}else{
$starlevel.="<img src='image/star5.png'>";
}
}
//资料
$informationq=$_SGLOBAL['db']->query("select count(*) as total from ".tname("spaceinfo")." where uid='{$space["uid"]}'");
$information=$_SGLOBAL['db']->fetch_array($informationq);
//var_dump($information);
//die();
$degree=$information["total"]/33;
$degree=$degree*100;
$degree=$degree."%";
6,将文件夹images,lib,image拷贝到根目录下 |