EasyCFM.COM ColdFusion Forums / PHP to CFML / Altering PHP (not conveting)

   Reply to Discussion | New Discussion << previous || next >> 
Posted By Discussion Topic: Altering PHP (not conveting)

book mark this topic Printer-friendly Version  send this discussion to a friend  new posts last

MIGhunter
05-05-2007 @ 9:17 PM
Reply
Edit
Profile
Send P.M.
My Gravatar!
Powered by Gravatar
Senior Member
Posts: 570
Joined: Apr 2006

I know this is a php > cfml forum but I have an application that I like.  I was just wanting to make a second page that doesn't have any headers and what not.  Here is what the original page looks like:
http://www.botdls.com/botdpoints/listevents.php?s=141e283bedf95f5e7d41c7a641cc2e0f

Here is what I want to do:
http://www.botdls.com/botdpoints/listevents1.php?s=

Only I want it so that when new events are added they get added to the 2nd page.  I just don't want the menu bar and other features that come with page 1.  Thanks.


<?php
/******************************
* EQdkp
* Copyright 2002-2003
* Licensed under the GNU GPL.  See COPYING for full terms.
* ------------------
* listevents.php
* Began: Fri December 20 2002
*
* $Id: listevents.php,v 1.11 2003/06/09 19:09:28 tsigo Exp $
*
******************************/

define('EQDKP_INC', true);
$eqdkp_root_path = './';
include_once($eqdkp_root_path
. 'common.php');

$user->
check_auth('u_event_list');

$sort_order = array(
    0 => array('event_name', 'event_name desc'),
    1 => array('event_value desc', 'event_value')
);

$current_order = switch_order($sort_order);

$total_events = $db->query_first('SELECT count(*) FROM ' . EVENTS_TABLE);

$start = ( isset($_GET['start']) ) ? $_GET['start'] : 0;

$sql = 'SELECT event_id, event_name, event_value
        FROM ' . EVENTS_TABLE . '
        ORDER BY '.$current_order['sql']. '
        LIMIT '.$start.','.$user->data['user_elimit'];

if ( !($events_result = $db->query($sql)) )
{
    message_die('Could not obtain event information', ', __FILE__, __LINE__, $sql);
}
while ( $event = $db->fetch_record($events_result) )
{
    $tpl->assign_block_vars('events_row', array(
        'ROW_CLASS' => $eqdkp->switch_row_class(),
        'U_VIEW_EVENT' => 'viewevent.php'.$SID . '&' . URI_EVENT . '='.$event['event_id'],
        'NAME' => stripslashes($event['event_name']),
        'VALUE' => $event['event_value'])
    );
}
$db->free_result($events_result);

$tpl->assign_vars(array(
    'L_NAME' => $user->lang['name'],
    'L_VALUE' => $user->lang['value'],

    'O_NAME' => $current_order['uri'][0],
    'O_VALUE' => $current_order['uri'][1],

    'U_LIST_EVENTS' => 'listevents.php'.$SID.'&',

    'START' => $start,
    'LISTEVENTS_FOOTCOUNT' => sprintf($user->lang['listevents_footcount'], $total_events, $user->data['user_elimit']),
    'EVENT_PAGINATION' => generate_pagination('listevents.php'.$SID.'&o='.$current_order['uri']['current'], $total_events, $user->data['user_elimit'], $start))
);

$eqdkp->set_vars(array(
    'page_title'    => sprintf($user->lang['title_prefix'], $eqdkp->config['guildtag'], $eqdkp->config['dkp_name']).': '.$user->lang['listevents_title'],
    'template_file' => 'listevents.html',
    'display'       => true)
);
?>



Website Designed and Developed by Pablo Varando.