Ejemplo n.º 1
0
//  original comment or credit authors.                                      //
//                                                                           //
//  This program is distributed in the hope that it will be useful,          //
//  but WITHOUT ANY WARRANTY; without even the implied warranty of           //
//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the            //
//  GNU General Public License for more details.                             //
//                                                                           //
//  You should have received a copy of the GNU General Public License        //
//  along with this program; if not, write to the Free Software              //
//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA //
// ------------------------------------------------------------------------- //
// Author: Raul Recio (AKA UNFOR)                                            //
// Project: The XOOPS Project                                                //
// ------------------------------------------------------------------------- //
include "header.php";
$part = new PartnerSystem();
$id = $_GET['id'];
if (empty($id) || !is_numeric($id)) {
    redirect_header("index.php", 1, _XP_NOPART);
    exit;
}
$partners = $part->load($id);
if ($part->getVar("url")) {
    if (!isset($_COOKIE['partners'][$id])) {
        setcookie("partners[{$id}]", $id, $xoopsModuleConfig['cookietime']);
        $part->setHits($id);
    }
    echo "<html><head><meta http-equiv='Refresh' content='0; URL=" . $part->getVar("url") . "'></head><body></body></html>";
} else {
    redirect_header("index.php", 1, _XP_NOPART);
}
Ejemplo n.º 2
0
//  This program is distributed in the hope that it will be useful,          //
//  but WITHOUT ANY WARRANTY; without even the implied warranty of           //
//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the            //
//  GNU General Public License for more details.                             //
//                                                                           //
//  You should have received a copy of the GNU General Public License        //
//  along with this program; if not, write to the Free Software              //
//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA //
// ------------------------------------------------------------------------- //
// Author: Raul Recio (AKA UNFOR)                                            //
// Project: The XOOPS Project                                                //
// ------------------------------------------------------------------------- //
include "header.php";
$xoopsOption['template_main'] = 'xoopspartners_index.html';
include XOOPS_ROOT_PATH . "/header.php";
$part = new PartnerSystem();
if (!isset($start)) {
    $start = 0;
}
if (!$start or $start == 0 and $xoopsModuleConfig['modlimit'] != 0) {
    $init = 0;
} elseif ($start != 0 and $xoopsModuleConfig['modlimit'] != 0) {
    $init = $start;
}
$admin = 0;
if ($xoopsUser) {
    $xoopsTpl->assign("partner_join", "<a href='join.php'><b>" . _MD_JOIN . "</b></a>");
    if ($xoopsUser->isAdmin()) {
        $admin = 1;
    }
}