Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

helpdesk 1.0


eric_jbdotcom

Recommended Posts

so far i have been able to get everything with this script to work except for the helpdesk_status.php page.

 

when a user enters their ticket # and name the page says there is no match.

 

here is the code for the page

 

<?php

if($submit != "true") {

?>

      <tr>

        <td><br><table border="0" width="100%" cellspacing="0" cellpadding="2">

          <tr>

            <td class="main">

              <p align="center"><?php echo TEXT_INFORMATION; ?></p>

            </td>

          </tr>

          <tr>

            <td class="main">

              <p align="center"><form method="post" action="<?php echo $PHP_SELF; ?>">

<input type="hidden" name="submit" value="true">

<table border=0 cellpadding=1 cellspacing=5>

<tr>

<td width=100 align="right"><font size=1 face="Verdana, arial, sans-serif"><?php echo TEXT_TICKET; ?></font></td>

<td><input type="text" size="20" maxlength="256" name="ticket"></td>

</tr>

<tr>

<td align="right"><font size=1 face="Verdana, arial, sans-serif"><?php echo TEXT_NAME; ?></font></td>

<td><input type="text" size="20" maxlength="256" name="usern"></td>

</tr>

<tr>

<td> </td>

<td align="right"><input type="submit" value="VIEW > >"></td>

</tr>

</table>

</form></p>

            </td>

          </tr>

    </table></td>

  </tr>

<tr>

<?php

} else {

$query = "SELECT * FROM helpdesk";

$result = tep_db_query($query);

while(list($ticket_id, $name, $email, $problem, $solution, $status, $date, $priority) = mysql_fetch_row($result))

  {   

    if($ticket_id == $ticket) {

      if ($email == $usern) {

        $found = 1;

      }

    }

  }

 

if($found != 1) {

?>

      <tr>

        <td><br><table border="0" width="100%" cellspacing="0" cellpadding="2">

          <tr>

            <td class="main">

              <p align="center"><?php echo TEXT_ERROR; ?></p>

            </td>

          </tr>

    </table></td>

  </tr>

<tr>

<?php

} else {

 

$query = "SELECT * FROM helpdesk WHERE ticket_id = '$ticket';";

$result = tep_db_query($query);

list($ticket_id, $name, $email, $problem, $solution, $status, $date, $priority) = mysql_fetch_row($result);

 

?>

      <tr>

        <td><br><table border="0" width="100%" cellspacing="0" cellpadding="2">

          <tr>

            <td class="main">

    <p>

    <?php echo TEXT_DATE; ?><b><?php echo $date; ?></b><br>

    <?php echo TEXT_STATUS; ?><b><?php echo $status; ?></b><br>

    <?php echo TEXT_PRIORITY; ?><b><?php echo $priority; ?></b><br>

    <?php echo TEXT_NAME; ?><b><?php echo $name; ?></b><br>

    <?php echo TEXT_EMAIL; ?><b><?php echo $email; ?></b>

    </p>

  </td>

          </tr>

          <tr>

            <td class="main"><form>

<textarea rows="5" name="problem" cols="45"><?php echo $problem; ?></textarea><br><br>

<?php

if($solution == '') { $solution = 'TEXT_SOLUTION';  }

?>

<b><?php echo TEXT_SOLUTION; ?>:</b><br>

<textarea rows="5" readonly name="solution" cols="45"><?php echo $solution; ?></textarea><br><?php

if ($status == "COMPLETED") {

echo TEXT_REOPEN_SUBMIT . '<a href="/shop/helpdesk_reopen.php?ticket='.$ticket.'&username='.$name.'">' . TEXT_CLICK_HERE .'</a>';

}

?>

</form></td>

          </tr>

        </table></td>

      </tr>

<?php

  }

}

?></center></center>

 

    </table></td>

<!-- body_text_eof //-->

    <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">

<!-- right_navigation //-->

<?php require(DIR_WS_INCLUDES . 'column_right.php'); ?>

<!-- right_navigation_eof //-->

    </table></td>

<!-- body_eof //-->

 

<!-- footer //-->

<?php require(DIR_WS_INCLUDES . 'footer.php'); ?>

<!-- footer_eof //-->

<br>

<script language="JavaScript" src="menu.js"></script>

<script language="JavaScript" src="menu_items.js"></script>

<script language="JavaScript" src="menu_tpl.js"></script>

<script language="JavaScript">

<!--

new menu (MENU_ITEMS, MENU_POS, MENU_STYLES);

//->

</script>

 

 

 

Do I need to edit another file instead of this one for the user to login?

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...