Temos pavadinimas: WordPress, Shopify ir PHPFusion programuotojų bendruomenė :: User fields (user profile views)

Parašė JaWa· 2011 Sau. 13 21:01:50
#1

Sveiki, Kodel pas mane atsiranda tarpas kai ikeliu sita user fielda ?



<?php
/*-------------------------------------------------------+
| <span style="border-bottom: 1px dotted black;">PHP</span>-Fusion Content Management System
| Copyright © 2002 - 2008 Nick Jones
| <a href='http://www.php-fu...' target='_blank'><span style='color:005C5B'>http://www.php-fu...</span></a>
+--------------------------------------------------------+
| Filename: user_views_include.php
| Author: Konick Multimedia
+--------------------------------------------------------+
| This program is released as free software under the
| Affero GPL license. You can redistribute it and/or
| modify it under the terms of this license which you
| can read by viewing the included agpl.txt or online
| at <a href='http://www.gnu.org/licen...' target='_blank'><span style='color:005C5B'>www.gnu.org/licen...</span></a> Removal of this
| copyright header is strictly prohibited without
| written permission from the original author(s).
+--------------------------------------------------------*/
if (!defined("IN_FUSION")) { die("Access Denied"); }
 
if ($profile_method == "display") {
echo "<tr><td width='1%' class='tbl1' style='white-space:nowrap'>".$locale['uf_views']."</td>";
echo "<td align='right' class='tbl1'>".$user_data['user_views']."</td></tr>";
 
//Check if the profile doesnt belong to the current visitor (if it does, dont update views)
if (iMEMBER && $userdata['user_id'] != $_GET['lookup'] || !iMEMBER && $user_data['user_ip'] != $_SERVER['REMOTE_ADDR']) {
//Update views
$newviews = $user_data['user_views'] + 1;
$updateviews = dbquery("UPDATE ".DB_USERS." SET user_views = '".$newviews."' WHERE user_id=".$_GET['lookup']);
}
}
?>



Nuotrauka:

[img]http://img824.imageshack.us/i/klausimas.jpg/[/img]