vBadvanced Forums  
Go Back   vBadvanced Forums > vBadvanced Products > vBadvanced CMPS > vBa CMPS v1.x (Archive - Closed for Posting) > Troubleshooting / "How do I..." Questions

 
 
Thread Tools Display Modes
  #1  
Old 08-19-2004, 04:06 PM
-peace- -peace- is offline
Member
 
Join Date: Jul 2004
Location: Chicago
Posts: 72
Default Adding a Module That Includes a PHP File

I have tried and tried but cant create this. I have enclosed a zip file (tried to add a zip file but cant to this message) of all the pages that are required to create a module that includes a php file. All I would like to see is my php file that is in my modules folder to be produced onto my add a page within my cmps module in my control panel - to be within my page below the navbar and to have the ability to choose left or right or center of the page. The zip file will show you that I have followed all the instructions as I described in your manual of "Adding a Module That Includes a PHP File" and have added the neccessary information that is required in my php file that is in your instructions- but still the "echo ="hello" shows up on the top of the screen. I know I can easily add the "hello" to a template within my admin control panel under my templates and just type hello in my template to produce it on my page but - I cant edit and add php code in my template in the styles area any php code - since it will produce errors. I would like my php file that resides in the modules area to be the page to have the php code that would produce a hello ie: echo ="hello". If I can see my hello being produced on my new page that I created in cmps from my code from the php file - then I can add the code that I really want to add into my php file in the modules area so that my page will be produce itself wrapped around the vbullentin style.

I hope this is understandable what I have wrote here. I just want to do what the program is designed to do but I cant figure it out - Adding a Module That Includes a PHP File.

I can sure use some help here. It may be something stupid that I am not doing- but I am following the instructions. If the instructions are not complete then what is it that needs to be done, do I have to edit the global.php file to make this work - or some other file???

Last edited by -peace-; 08-25-2004 at 09:57 AM.
  #2  
Old 08-25-2004, 06:30 PM
Brian's Avatar
Brian Brian is offline
Administrator
 
Join Date: Jan 2004
Location: Georgia, USA
Posts: 34,240
Default Re: modules

The code needs to be put into a variable, and then that variable added in the template. So instead, you should have:

$output = 'Hello';

And then add $output to your template.

Also, there's no reason for all of the extra code you have in there... Everything between <? and echo "hello"; can be removed.
  #3  
Old 08-26-2004, 11:54 AM
-peace- -peace- is offline
Member
 
Join Date: Jul 2004
Location: Chicago
Posts: 72
Default Re: modules

ok that worked but its limited.
I looked at this and this is the closest match to what I am trying to do. But even this is causing me sql errors most likely due to the external file and its details.

http://www.vbadvanced.com/forum/showthread.php?t=1082


SO , with this in mind and its limitations. What I wondering is :

Can I restrict a folder thats located in my root to an administrator group thats in vbullentin?

if not

Can I restrict a file or webpage in my root to an administrator group thats in vbullentin?

Anyone who gets to the home page has to log in to view certain forums or threads currently. If he or she has logged in and is in a vbullentin group that I put them into. Then that person can (if rights permit) view a certain page. This is what I want to do.This page is now currently in a folder in the root of the website. I dont want someone to just go up to the address bar and type in the url to the specific file and view it without restrictions and vbuillentin security features.

I am aware of windows 2000 rights and I could just restict the folder to a group in the group manager of the server but that would require a double login procedure for the user and users forget passwords all the time. It would be a headache on me to manage it like that.

If there is a way I could utilize the username/password cookies within vbullentin and place into my webpage the code that would be like :

if member of adminstrator then - view page
if not member of administrator then - dont show page

Can vbullentin do this? Can any idea here be done? Or will I have to just ristrict the folder within windows 2000 to a specific group? I am hoping for someway to do it with maybe the cookies.

Last edited by -peace-; 08-26-2004 at 11:57 AM.
  #4  
Old 08-26-2004, 03:32 PM
-peace- -peace- is offline
Member
 
Join Date: Jul 2004
Location: Chicago
Posts: 72
Default Re: modules

Well I found out how to add a external page to your site.

<?php
ob_start();
include("http://hrc/reports/cld/checkloglist.php");
$string = ob_get_contents();
ob_end_clean();
eval('$home[$mods[\'modid\']][\'content\'] .= "' . fetch_template('test') . '";');

?>

But now the page is displayed perfectly and the vbullentin is providing the security I wanted. The problem I am having now is on my page I have a link that takes you to http://hrc/reports/cld/checkloglist.php?start=21 by clicking on a next record button. When you click it - it takes you away from the actual page of http://hrc/reports/cld/cmps_index.php?page=test and now there is no vbullentin security.

I have tried passing http://hrc/reports/cld/cmps_index.ph...=test?start=21 but that doesnt work.

Does anyone know what to do about this?
  #5  
Old 08-26-2004, 04:13 PM
Brian's Avatar
Brian Brian is offline
Administrator
 
Join Date: Jan 2004
Location: Georgia, USA
Posts: 34,240
Default Re: modules

You'll have to modify the file and change the link to point to your cmps_index.php file instead of the current file.
  #6  
Old 08-26-2004, 04:32 PM
-peace- -peace- is offline
Member
 
Join Date: Jul 2004
Location: Chicago
Posts: 72
Default Re: modules

Quote:
Originally Posted by Brian
You'll have to modify the file and change the link to point to your cmps_index.php file instead of the current file.
Ok I did that and the page comes up but no records show at all.
Here is my code:

Sorry for all the code

At the bottom you will see this:

<td><a href="checkloglist.php?start=<?php echo $NextStart; ?>"><img src="images/next.gif" alt="Next" width="20" height="15" border="0"></a></td>

I changed it to
<td><a href="cmps_index.php?start=<?php echo $NextStart; ?>"><img src="images/next.gif" alt="Next" width="20" height="15" border="0"></a></td>

Doesnt work - no records show. There are approx 500 records in database and 20 show at a time, thats why I hit the nextpage buton and it points to this other link.



Quote:
<?php session_start(); ?>
<?php
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); // date in the past
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); // always modified
header("Cache-Control: no-store, no-cache, must-revalidate"); // HTTP/1.1
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache"); // HTTP/1.0
?>
<?php include ("db.php") ?>
<?php include ("phpmkrfn.php") ?>
<?php
$displayRecs = 20;
$recRange = 10;
$dbwhere = "";
$masterdetailwhere = "";
$searchwhere = "";
$a_search = "";
$b_search = "";
$whereClause = "";

// get search criteria for basic search
$pSearch = @$HTTP_GET_VARS["psearch"];
$pSearchType = @$HTTP_GET_VARS["psearchtype"];
if ($pSearch <> "") {
$pSearch = str_replace("'", "\'", $pSearch);
if ($pSearchType <> "") {
while (strpos($pSearch, " ") > 0) {
$pSearch = str_Replace(" ", " ",$pSearch);
}
$arpSearch = explode(" ", trim($pSearch));
foreach ($arpSearch as $kw) {
$b_search .= "(";
$b_search .= "`Issuer` LIKE '%" . trim($kw) . "%' OR ";
$b_search .= "`Amount` LIKE '%" . trim($kw) . "%' OR ";
$b_search .= "`Comments` LIKE '%" . trim($kw) . "%' OR ";
$b_search .= "`Category` LIKE '%" . trim($kw) . "%' OR ";
$b_search .= "`Date_Received` LIKE '%" . trim($kw) . "%' OR ";
$b_search .= "`Received_By` LIKE '%" . trim($kw) . "%' OR ";
if (substr($b_search, -4) == " OR ") {
$b_search = substr($b_search, 0, strlen($b_search)-4);
}
$b_search .= ") " . $pSearchType . " ";
}
} else {
$b_search .= "`Issuer` LIKE '%" . $pSearch . "%' OR ";
$b_search .= "`Amount` LIKE '%" . $pSearch . "%' OR ";
$b_search .= "`Comments` LIKE '%" . $pSearch . "%' OR ";
$b_search .= "`Category` LIKE '%" . $pSearch . "%' OR ";
$b_search .= "`Date_Received` LIKE '%" . $pSearch . "%' OR ";
$b_search .= "`Received_By` LIKE '%" . $pSearch . "%' OR ";
}
}
if (substr($b_search, -4) == " OR ") {
$b_search = substr($b_search, 0, strlen($b_search)-4);
}
if (substr($b_search, -5) == " AND ") {
$b_search = substr($b_search, 0, strlen($b_search)-5);
}

// build search criteria
if ($a_search <> "") {
$searchwhere = $a_search; //advanced search
} elseIf ($b_search <> "") {
$searchwhere = $b_search; //basic search
}

// save search criteria
if ($searchwhere <> "") {
$HTTP_SESSION_VARS["checklog_searchwhere"] = $searchwhere;
$startRec = 1; //reset start record counter (new search)
$HTTP_SESSION_VARS["checklog_REC"] = $startRec;
} else {
$searchwhere = @$HTTP_SESSION_VARS["checklog_searchwhere"];
}

// get clear search cmd
if (@$HTTP_GET_VARS["cmd"] <> "") {
$cmd = $HTTP_GET_VARS["cmd"];
if (strtoupper($cmd) == "RESET") {
$searchwhere = ""; //reset search criteria
$HTTP_SESSION_VARS["checklog_searchwhere"] = $searchwhere;
} elseif (strtoupper($cmd) == "RESETALL") {
$searchwhere = ""; //reset search criteria
$HTTP_SESSION_VARS["checklog_searchwhere"] = $searchwhere;
}
$startRec = 1; //reset start record counter (reset command)
$HTTP_SESSION_VARS["checklog_REC"] = $startRec;
}

// build dbwhere
if ($masterdetailwhere <> "" ) {
$dbwhere .= "(" . $masterdetailwhere . ") AND ";
}
if ($searchwhere <> "" ) {
$dbwhere .= "(" . $searchwhere . ") AND ";
}
if (strlen($dbwhere) > 5) {
$dbwhere = substr($dbwhere, 0, strlen($dbwhere)-5); // trim rightmost AND
}

// default order
$DefaultOrder = "";
$DefaultOrderType = "";

// default filter
$DefaultFilter = "";

// check for an Order parameter
$OrderBy = "";
if (@$HTTP_GET_VARS["order"] <> "") {
$OrderBy = $HTTP_GET_VARS["order"];

// check if an ASC/DESC toggle is required
if (@$HTTP_SESSION_VARS["checklog_OB"] == $OrderBy) {
if (@$HTTP_SESSION_VARS["checklog_OT"] == "ASC") {
$HTTP_SESSION_VARS["checklog_OT"] = "DESC";
} else {
$HTTP_SESSION_VARS["checklog_OT"] = "ASC";
}
} else {
$HTTP_SESSION_VARS["checklog_OT"] = "ASC";
}
$HTTP_SESSION_VARS["checklog_OB"] = $OrderBy;
$HTTP_SESSION_VARS["checklog_REC"] = 1;
} else {
$OrderBy = @$HTTP_SESSION_VARS["checklog_OB"];
if ($OrderBy == "") {
$OrderBy = $DefaultOrder;
$HTTP_SESSION_VARS["checklog_OB"] = $OrderBy;
$HTTP_SESSION_VARS["checklog_OT"] = $DefaultOrderType;
}
}
$conn = mysql_connect(HOST, USER, PASS);
mysql_select_db(DB);

// build SQL
$strsql = "SELECT * FROM `checklog`";
if ($DefaultFilter <> "") {
$whereClause .= "(" . $DefaultFilter . ") AND ";
}
if ($dbwhere <> "" ) {
$whereClause .= "(" . $dbwhere . ") AND ";
}
if (substr($whereClause, -5) == " AND ") {
$whereClause = substr($whereClause, 0, strlen($whereClause)-5);
}
if ($whereClause <> "") {
$strsql .= " WHERE " . $whereClause;
}
if ($OrderBy <> "") {
$strsql .= " ORDER BY `" . $OrderBy . "` " . @$HTTP_SESSION_VARS["checklog_OT"];
}

//echo $strsql; // comment out this line to view the SQL
$rs = mysql_query($strsql);
$totalRecs = intval(@mysql_num_rows($rs));

// check for a START parameter
if (@$HTTP_GET_VARS["start"] <> "") {
$startRec = $HTTP_GET_VARS["start"];
$HTTP_SESSION_VARS["checklog_REC"] = $startRec;
} elseif (@$HTTP_GET_VARS["pageno"] <> "") {
$pageno = $HTTP_GET_VARS["pageno"];
if (is_numeric($pageno)) {
$startRec = ($pageno - 1)*$displayRecs + 1;
if ($startRec <= 0) {
$startRec = 1;
} elseIf ($startRec >= (($totalRecs-1)/$displayRecs)*$displayRecs+1) {
$startRec = (($totalRecs-1)/$displayRecs)*$displayRecs + 1;
}
$HTTP_SESSION_VARS["checklog_REC"] = $startRec;
} else {
$startRec = @$HTTP_SESSION_VARS["checklog_REC"];
if (!is_numeric($startRec)) {
$startRec = 1; // reset start record counter
$HTTP_SESSION_VARS["checklog_REC"] = $startRec;
}
}
} else {
$startRec = @$HTTP_SESSION_VARS["checklog_REC"];
if (!is_numeric($startRec)) {
$startRec = 1; // reset start record counter
$HTTP_SESSION_VARS["checklog_REC"] = $startRec;
}
}
?>
<?php include ("header.php") ?>

<p><span class="phpmaker"><font color="#FF0000"><strong>YOU ARE VIEWING THE CHECKLOG DATABASE</strong></font></span></p>
<a href="datain.htm"><strong>To enter information into this checklog database click here.</strong></a><br>
<form action="checkloglist.php">
<table border="0" cellspacing="0" cellpadding="4">
<tr>
<td><span class="phpmaker">Quick Search (*)</span></td>
<td>
<input type="text" name="psearch" size="20">
<input type="Submit" name="Submit" value="GO">
&nbsp;&nbsp;<a href="checkloglist.php?cmd=reset"><span class="phpmaker">Show all</span></a>
</td>
</tr>
<tr><td>&nbsp;</td><td><input type="radio" name="psearchtype" value="" checked><span class="phpmaker">Exact phrase</span>&nbsp;&nbsp;<input type="radio" name="psearchtype" value="AND"><span class="phpmaker">All words</span>&nbsp;&nbsp;<input type="radio" name="psearchtype" value="OR"><span class="phpmaker">Any word</span></td></tr>
</table>
</form>
<form method="post">
<table border="0" cellspacing="1" cellpadding="4" bgcolor="#0033CC">
<tr bgcolor="#0033CC">
<td valign="top"><span class="phpmaker" style="color: #FFFFFF;">
<a href="checkloglist.php?order=<?php echo urlencode("Check_Number");?>" style="color: #FFFFFF;">Check Number&nbsp;<?php if ($OrderBy == "Check_Number") { ?><span class="ewTableOrderIndicator"><?php echo (@$HTTP_SESSION_VARS["checklog_OT"] == "ASC") ? 5 : ((@$HTTP_SESSION_VARS["checklog_OT"] == "DESC") ? 6 : "") ?></span><?php } ?></a>
</span></td>
<td valign="top"><span class="phpmaker" style="color: #FFFFFF;">
<a href="checkloglist.php?order=<?php echo urlencode("Issuer");?>" style="color: #FFFFFF;">Issuer&nbsp;<?php if ($OrderBy == "Issuer") { ?><span class="ewTableOrderIndicator"><?php echo (@$HTTP_SESSION_VARS["checklog_OT"] == "ASC") ? 5 : ((@$HTTP_SESSION_VARS["checklog_OT"] == "DESC") ? 6 : "") ?></span><?php } ?></a>
</span></td>
<td valign="top"><span class="phpmaker" style="color: #FFFFFF;">
<a href="checkloglist.php?order=<?php echo urlencode("Amount");?>" style="color: #FFFFFF;">Amount&nbsp;(*)<?php if ($OrderBy == "Amount") { ?><span class="ewTableOrderIndicator"><?php echo (@$HTTP_SESSION_VARS["checklog_OT"] == "ASC") ? 5 : ((@$HTTP_SESSION_VARS["checklog_OT"] == "DESC") ? 6 : "") ?></span><?php } ?></a>
</span></td>
<td valign="top"><span class="phpmaker" style="color: #FFFFFF;">
<a href="checkloglist.php?order=<?php echo urlencode("Comments");?>" style="color: #FFFFFF;">Comments&nbsp;<?php if ($OrderBy == "Comments") { ?><span class="ewTableOrderIndicator"><?php echo (@$HTTP_SESSION_VARS["checklog_OT"] == "ASC") ? 5 : ((@$HTTP_SESSION_VARS["checklog_OT"] == "DESC") ? 6 : "") ?></span><?php } ?></a>
</span></td>
<td valign="top"><span class="phpmaker" style="color: #FFFFFF;">
<a href="checkloglist.php?order=<?php echo urlencode("Category");?>" style="color: #FFFFFF;">Category&nbsp;<?php if ($OrderBy == "Category") { ?><span class="ewTableOrderIndicator"><?php echo (@$HTTP_SESSION_VARS["checklog_OT"] == "ASC") ? 5 : ((@$HTTP_SESSION_VARS["checklog_OT"] == "DESC") ? 6 : "") ?></span><?php } ?></a>
</span></td>
<td valign="top"><span class="phpmaker" style="color: #FFFFFF;">
<a href="checkloglist.php?order=<?php echo urlencode("Date_Received");?>" style="color: #FFFFFF;">Date Received&nbsp;(*)<?php if ($OrderBy == "Date_Received") { ?><span class="ewTableOrderIndicator"><?php echo (@$HTTP_SESSION_VARS["checklog_OT"] == "ASC") ? 5 : ((@$HTTP_SESSION_VARS["checklog_OT"] == "DESC") ? 6 : "") ?></span><?php } ?></a>
</span></td>
<td valign="top"><span class="phpmaker" style="color: #FFFFFF;">
<a href="checkloglist.php?order=<?php echo urlencode("Received By");?>" style="color: #FFFFFF;">Received By&nbsp;<?php if ($OrderBy == "Received By") { ?><span class="ewTableOrderIndicator"><?php echo (@$HTTP_SESSION_VARS["checklog_OT"] == "ASC") ? 5 : ((@$HTTP_SESSION_VARS["checklog_OT"] == "DESC") ? 6 : "") ?></span><?php } ?></a>
</span></td>
<td valign="top"><span class="phpmaker" style="color: #FFFFFF;">
<a href="checkloglist.php?order=<?php echo urlencode("Reference ID");?>" style="color: #FFFFFF;">Reference ID&nbsp;<?php if ($OrderBy == "Reference ID") { ?><span class="ewTableOrderIndicator"><?php echo (@$HTTP_SESSION_VARS["checklog_OT"] == "ASC") ? 5 : ((@$HTTP_SESSION_VARS["checklog_OT"] == "DESC") ? 6 : "") ?></span><?php } ?></a>
</span></td>
<td valign="top"><span class="phpmaker" style="color: #FFFFFF;">
<a href="checkloglist.php?order=<?php echo urlencode("Running_Total");?>" style="color: #FFFFFF;">Running Total&nbsp;<?php if ($OrderBy == "Running_Total") { ?><span class="ewTableOrderIndicator"><?php echo (@$HTTP_SESSION_VARS["checklog_OT"] == "ASC") ? 5 : ((@$HTTP_SESSION_VARS["checklog_OT"] == "DESC") ? 6 : "") ?></span><?php } ?></a>
</span></td>

</tr>
<?php

// avoid starting record > total records
if ($startRec > $totalRecs) {
$startRec = $totalRecs;
}

// set the last record to display
$stopRec = $startRec + $displayRecs - 1;
$recCount = $startRec - 1;

// move to the first record
@mysql_data_seek($rs, $recCount);
$recActual = 0;
while (($row = @mysql_fetch_array($rs)) && ($recCount < $stopRec)) {
$recCount++;
if ($recCount >= $startRec) {
$recActual++;
$bgcolor = "#FFFFFF"; // row color
if (($recCount % 2) <> 0) { // display alternate color for rows
$bgcolor = "#F5F5F5";
}

// load key for record
$key = @$row["Reference ID"];
$x_Check_Number = @$row["Check_Number"];
$x_Issuer = @$row["Issuer"];
$x_Amount = @$row["Amount"];
$x_Comments = @$row["Comments"];
$x_Category = @$row["Category"];
$x_Date_Received = @$row["Date_Received"];
$x_Received_By3A = @$row["Received_By"];
$x_Reference_ID = @$row["Reference ID"];
$x_Running_Total = @$row["Running_Total"];
?>
<tr bgcolor="<?php echo $bgcolor; ?>">
<td><span class="phpmaker"><?php echo $x_Check_Number; ?></span>&nbsp;</td>
<td><span class="phpmaker"><?php echo $x_Issuer; ?></span>&nbsp;</td>
<td><span class="phpmaker"><?php echo $x_Amount; ?></span>&nbsp;</td>
<td><span class="phpmaker"><?php echo $x_Comments; ?></span>&nbsp;</td>
<td><span class="phpmaker"><?php echo $x_Category; ?></span>&nbsp;</td>
<td><span class="phpmaker"><?php echo $x_Date_Received; ?></span>&nbsp;</td>
<td><span class="phpmaker"><?php echo $x_Received_By3A; ?></span>&nbsp;</td>
<td><span class="phpmaker"><?php echo $x_Reference_ID; ?></span>&nbsp;</td>
<td><span class="phpmaker"><?php echo $x_Running_Total; ?></span>&nbsp;</td>


</tr>
<?php
}
}
?>
</table>
</form>
<?php

// close connection
@mysql_free_result($rs);
mysql_close($conn);
?>
<table border="0" cellspacing="0" cellpadding="10"><tr><td>
<?php
if ($totalRecs > 0) {
$rsEof = ($totalRecs < ($startRec + $displayRecs));
$PrevStart = $startRec - $displayRecs;
if ($PrevStart < 1) $PrevStart = 1;
$NextStart = $startRec + $displayRecs;
if ($NextStart > $totalRecs ) $NextStart = $startRec;
$LastStart = intval(($totalRecs-1)/$displayRecs)*$displayRecs+1;
?>
<form>
<table border="0" cellspacing="0" cellpadding="0"><tr><td><span class="phpmaker">Page</span>&nbsp;</td>
<!--first page button-->
<?php
if ($startRec == 1) {
?>
<td><img src="images/firstdisab.gif" alt="First" width="20" height="15" border="0"></td>
<?php
} else {
?>
<td><a href="checkloglist.php?start=1"><img src="images/first.gif" alt="First" width="20" height="15" border="0"></a></td>
<?php
}
?>
<!--previous page button-->
<?php
if ($PrevStart == $startRec) {
?>
<td><img src="images/prevdisab.gif" alt="Previous" width="20" height="15" border="0"></td>
<?php
} else {
?>
<td><a href="checkloglist.php?start=<?php echo $PrevStart; ?>"><img src="images/prev.gif" alt="Previous" width="20" height="15" border="0"></a></td>
<?php
}
?>
<!--current page number-->
<td><input type="text" name="pageno" value="<?php echo intval(($startRec-1)/$displayRecs) +1; ?>" size="4" style="font-size: 9pt;"></td>
<!--next page button-->
<?php
if ($NextStart == $startRec) {
?>
<td><img src="images/nextdisab.gif" alt="Next" width="20" height="15" border="0"></td>
<?php
} else {
?>
<td><a href="checkloglist.php?start=<?php echo $NextStart; ?>"><img src="images/next.gif" alt="Next" width="20" height="15" border="0"></a></td>
<?php
}
?>
<!--last page button-->
<?php
if ($LastStart == $startRec) {?>
<td><img src="images/lastdisab.gif" alt="Last" width="20" height="15" border="0"></td>
<?php
} else {
?>
<td><a href="checkloglist.php?start=<?php echo $LastStart; ?>"><img src="images/last.gif" alt="Last" width="20" height="15" border="0"></a></td>
<?php
}
?>
<td><a href="checklogadd.php"><img src="images/addnew.gif" alt="Add new" width="20" height="15" border="0"></a></td>
<td>&nbsp;<span class="phpmaker">of <?php echo intval(($totalRecs-1)/$displayRecs) + 1; ?></span></td>
</td></tr></table>
</form>
<?php
if ($startRec > $totalRecs) {
$startRec = $totalRecs;
}
$stopRec = $startRec + $displayRecs - 1;
$recCount = $totalRecs - 1;
if ($rsEof) {
$recCount = $totalRecs;
}
if ($stopRec > $recCount) {
$stopRec = $recCount;
}
?>
<span class="phpmaker">Records <?php echo $startRec; ?> to <?php echo $stopRec; ?> of <?php echo $totalRecs; ?></span>
<?php
} else {
?>
<span class="phpmaker">No records found</span>
<p>
<a href="checklogadd.php"><img src="images/addnew.gif" alt="Add new" width="20" height="15" border="0"></a>
</p>
<?php
}
?>
</td></tr></table>
<?php include ("footer.php") ?>

Last edited by -peace-; 08-26-2004 at 04:38 PM.
  #7  
Old 08-26-2004, 06:18 PM
Brian's Avatar
Brian Brian is offline
Administrator
 
Join Date: Jan 2004
Location: Georgia, USA
Posts: 34,240
Default Re: modules

Try this instead:

<td><a href="cmps_index.php?page=test&amp;start=<?php echo $NextStart; ?>"><img src="images/next.gif" alt="Next" width="20" height="15" border="0"></a></td>
  #8  
Old 08-26-2004, 06:35 PM
-peace- -peace- is offline
Member
 
Join Date: Jul 2004
Location: Chicago
Posts: 72
Default Re: modules

Quote:
Originally Posted by Brian
Try this instead:

<td><a href="cmps_index.php?page=test&amp;start=<?php echo $NextStart; ?>"><img src="images/next.gif" alt="Next" width="20" height="15" border="0"></a></td>
Brian I thought you had it there for me - darn it !!! The link does now point to

http://hrc/reports/cld/cmps_index.ph...=test&start=21

But no records show. I am going to try and attach 3 pics for you to see two with records and one without going to this location.
  #9  
Old 08-26-2004, 06:42 PM
Brian's Avatar
Brian Brian is offline
Administrator
 
Join Date: Jan 2004
Location: Georgia, USA
Posts: 34,240
Default Re: modules

Did you just rename the page to cld? If so, then you'll need to change the 'test' part in that code I gave you to 'cld'.
  #10  
Old 08-26-2004, 06:59 PM
-peace- -peace- is offline
Member
 
Join Date: Jul 2004
Location: Chicago
Posts: 72
Default Re: modules

Quote:
Originally Posted by Brian
Did you just rename the page to cld? If so, then you'll need to change the 'test' part in that code I gave you to 'cld'.
I should have caught that - duh

I changed it to cld and - almost had a heart attack cause there was info from the database I looked at it and it was the original 1 - 20 records. I hit the button again and still the records were 1 - 20. hmmmm

Nice try Brian and I really do thank you for your efforts in this. There has to be a way to do this. Its just passing a url.

Any other ideas??? I am willing to give anything a shot - it took me a lot of research to get this were I am right now and would like to see this work.

Also just on another note - my time is off by like 5 hours and I change it in the control panel but nothing happens. I mean I have tried all setting on this and none works. But thats nothing I to worried about at the moment. I am more concerned about choosing more records out of the database. and showing it on my screen.

This is basically a page in a page. If I go to the page which is
http://hrc/reports/cld/checkloglist.php it comes up and works fine. I am going to attach 2 pages of the external files in action.

Last edited by -peace-; 08-26-2004 at 07:09 PM.
  #11  
Old 08-26-2004, 07:14 PM
Brian's Avatar
Brian Brian is offline
Administrator
 
Join Date: Jan 2004
Location: Georgia, USA
Posts: 34,240
Default Re: modules

/forum/includes/vba_cmps_include_bottom.php

Look for:

// Process Active Modules

Above that add:

globalize($_REQUEST, array('start' => INT));

Let me know if that helps.
  #12  
Old 08-27-2004, 08:36 AM
-peace- -peace- is offline
Member
 
Join Date: Jul 2004
Location: Chicago
Posts: 72
Default Re: modules

Quote:
Originally Posted by Brian
/forum/includes/vba_cmps_include_bottom.php

Look for:

// Process Active Modules

Above that add:

globalize($_REQUEST, array('start' => INT));

Let me know if that helps.
Hey Brian,

I added the extra code but still it goes to the other webpage and show the 21 - 40 records but now I am out of the cmps page. I view the page at http://hrc/reports/cld/cmps_index.php?page=cld and when I click on the next records it takes me to http://hrc/reports/cld/checkloglist.php?start=21. Is it possible to have a dynamic page in a dynamic page and perform a function within the dynamic page thats embeded within a dynamic page? Because I feel thats what I am trying to do here. I mean the internal page (checkloglist.php) in my body of the page (cmps_index.php) has code built within its page (checkloglist.php) to perform functions and when those functions are passed they are passed to (checkloglist.php).

This would be simpler if I could capture the cookie of the user viewing the page. I mean currently the cld page is restricted to the accounting group that I created in my control panel - so no one even if there registered can view this page unless they are part of the boards accounting group. Thats the key that I am trying to accomplish here. If I could place within the header of my checkloglist.php file the code for checking a cookie then I could just run thoses pages by themselves without haveing to embed it within a cmps page, if you can see what I am trying to say. The users are in the forums database and if there is some external code that will validate them to view a page like you have now - it validates the cmps page- what validates the page? Where is the cookie code and is it usable within php or html? If I could grab that code from the cmps page or wherever its residing then I could place that code in a header of my external pages to verify the user viewing thoses external pages. Can this be done??

Last edited by -peace-; 08-27-2004 at 08:39 AM.
  #13  
Old 08-27-2004, 01:10 PM
Brian's Avatar
Brian Brian is offline
Administrator
 
Join Date: Jan 2004
Location: Georgia, USA
Posts: 34,240
Default Re: modules

Did you make sure to change "checkloglist.php" everwhere in the file?
Validating users through a cookie and such would probably be a little harder and not as secure as running it straight through vBulletin.
  #14  
Old 08-27-2004, 01:39 PM
-peace- -peace- is offline
Member
 
Join Date: Jul 2004
Location: Chicago
Posts: 72
Default Re: modules

Quote:
Originally Posted by Brian
Did you make sure to change "checkloglist.php" everwhere in the file?
Validating users through a cookie and such would probably be a little harder and not as secure as running it straight through vBulletin.
Thanks for responding.

Are you saying all the code in checkloglist.php thats has checkloglist in there needs to be changed to cmps_index.php?

Even the statement that says

<form action="checkloglist.php">
if I use
<form action="cmps_index.php">
how will this work?

Sorry I am confused

--------------------------------------------------------------------

Ok I replaced checkloglist.php with cmps_index.php in the checkloglist.php and the output is blank .I am attaching a screen shot for you

Last edited by -peace-; 08-27-2004 at 01:53 PM.
  #15  
Old 08-27-2004, 03:36 PM
-peace- -peace- is offline
Member
 
Join Date: Jul 2004
Location: Chicago
Posts: 72
Default Re: modules

I logged in as another person from a workstation and tried to go to the page in question cmps_index.php and the first page comes up but when he hits the button for the next records this your are not authorized page comes up. He is authorized though to view it within the control panel

Pic is included.

Last edited by -peace-; 08-27-2004 at 03:47 PM.
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Porting PHP-Nuke Modules: Can it be done? Sovereign Add-On Modules & Modifications 4 04-08-2005 05:14 PM
Modules displayed by user choice? Delirion Add-On Modules & Modifications 12 09-21-2004 04:03 PM
edit modules -peace- Troubleshooting / "How do I..." Questions 8 08-13-2004 12:47 PM
Download Modules? MickeyD Add-On Modules & Modifications 3 07-19-2004 03:26 PM
Active modules not showing contramontanum Troubleshooting / "How do I..." Questions 3 06-21-2004 01:43 PM


All times are GMT -4. The time now is 10:39 AM.

Forums Powered by vBulletin, Copyright ©2000-2009, Jelsoft Enterprises Ltd.
Please note that vBadvanced is in no way affiliated with Jelsoft Enterprises Ltd, nor will Jelsoft be able to provide any support for our products.