Hi.

when users first come to the frontpage they can press the button to make a new ticket.

They get confirmation mail and they can check their status. But when they are logged in and try to make another ticket their name and email get's filled in automaticly and they can not see any of the other fields!

It's all blank....

If a user times out and then tried to make a ticket they still get their name automaticly filled inn and email, but cannot see anything more. It's blank

the user then needs to log in with email and a ticket number and then log out themselves, and then they can make a ticket!

I really need help with this.. it does not make sense at all!

Hmm.. thats strange. Do you have a test site up that I could make a ticket and try it out?

it is run internally on company servers,, but give me a sec and i can get it on an external server!

EDIT:

I cannot make it send mail atm.. but i can give you the ticket id!

Beware, the site is norwegian ^^

http://www.cero89.com/support(http://www.cero89.com/support)

it's done mate!!

I cannot make it send mail atm.. but i can give you the ticket id!

Beware, the site is norwegian ^^

http://www.cero89.com/support(http://www.cero89.com/support)

Posted a ticket

I see that when something is wrong with the php code.. something right after your "serial number" is wrong. could be a simple thing like a space. Heading out for awhile, I can help more later

how can it be wrong? when it works perfectly when not logged in!

what file are you thinking about?

Send me your open.inc.php under the client directory.. I believe the problem could be there

http://www.cero89.com/support/downloads/open.inc.zip(http://www.cero89.com/support/downloads/open.inc.zip)

if you could post it as code as the approvel takes forever!

Approval for what?

Anyway here you go:

<?php

if(!defined('OSTCLIENTINC')) die('Kwaheri rafiki!'); //Say bye to our friend..

$info=($_POST && $errors)?Format:($_POST)(); //on error...use the post data

?>

<div>

<?if($errors) {?>

<p align="center" id="errormessage"><?=$errors?></p>

<?}elseif($msg) {?>

<p align="center" id="infomessage"><?=$msg?></p>

<?}elseif($warn) {?>

<p id="warnmessage"><?=$warn?></p>

<?}?>

</div>

<div>Vennligst fyll inn feltene s&aring; godt som mulig.</div><br>

<form action="open.php" method="POST" enctype="multipart/form-data">

<table align="left" cellpadding=2 cellspacing=1 width="90%">

<tr>

<th width="20%">Fullt Navn:</th>

<td>

<?if ($thisclient && ($name=$thisclient->getName())) {

?>

<input type="hidden" name="name" value="<?=$name?>"><?=$name?>

<?}else {?>

<input type="text" name="name" size="25" value="<?=$info?>">

<?}?>

&nbsp;<font class="error">*&nbsp;<?=$errors?></font>

</td>

</tr>

<tr>

<th nowrap >Email Addresse:</th>

<td>

<?if ($thisclient && ($email=$thisclient->getEmail())) {

?>

<input type="hidden" name="email" size="25" value="<?=$email?>"><?=$email?>

<?}else {?>

<input type="text" name="email" size="25" value="<?=$info?>">

<?}?>

&nbsp;<font class="error">*&nbsp;<?=$errors?></font>

</td>

</tr>

<tr>

<td>Telefon:</td>

<td><input type="text" name="phone" size="25" value="<?=$info?>">

&nbsp;Ext&nbsp;<input type="text" name="phone_ext" size="6" value="<?=$info?>">

&nbsp;<font class="error">&nbsp;<?=$errors?></font></td>

</tr>

<tr height=2px><td align="left" colspan=2 >&nbsp;</td</tr>

<tr>

<th width="20%">Serienummer:</th>

<td>

<?if ($thisclient && ($name=$thisclient->getSerienummer())) {

?>

<input type="hidden" name="serienummer" value="<?=$serienummer?>"><?=$serienummer?>

<?}else {?>

<input type="text" name="serienummer" size="25" value="<?=$info?>">

<?}?>

&nbsp;<font class="error">&nbsp;<?=$errors?></font>

</td>

</tr>

<tr>

<th width="20%">Klasse:</th>

<td>

<?if ($thisclient && ($name=$thisclient->getKlasse())) {

?>

<input type="hidden" name="klasse" value="<?=$klasse?>"><?=$klasse?>

<?}else {?>

<input type="text" name="klasse" size="25" value="<?=$info?>">

<?}?>

&nbsp;<font class="error">&nbsp;<?=$errors?></font>

</td>

</tr>

<tr>

<th>Kategori:</th>

<td>

<select name="topicId">

<option value="" selected >Velg en</option>

<?

$services= db_query('SELECT topic_id,topic FROM '.TOPIC_TABLE.' WHERE isactive=1 ORDER BY topic');

while (list($topicId,$topic) = db_fetch_row($services)){

$selected = ($info==$topicId)?'selected':''; ?>

<option value="<?=$topicId?>"<?=$selected?>><?=$topic?></option>

<?

}?>

</td>

</tr>

<tr>

<th>Emne:</th>

<td>

<input type="text" name="subject" size="35" value="<?=$info?>">

&nbsp;<font class="error">*&nbsp;<?=$errors?></font>

</td>

</tr>

<tr>

<th valign="top">Melding:</th>

<td>

<? if($errors) {?> <font class="error"><b>&nbsp;<?=$errors?></b></font><br/><?}?>

<textarea name="message" cols="35" rows="8" wrap="soft" style="width%"><?=$info?></textarea></td>

</tr>

<?

if($cfg->allowPriorityChange() ) {

$sql='SELECT priority_id,priority_desc FROM '.TICKET_PRIORITY_TABLE.' WHERE ispublic=1 ORDER BY priority_urgency DESC';

if(($priorities=db_query($sql)) && db_num_rows($priorities)){ ?>

<tr>

<td>Prioritet:</td>

<td>

<select name="pri">

<?

$info=$info?$info:$cfg->getDefaultPriorityId(); //use system's default priority.

while($row=db_fetch_array($priorities)){ ?>

<option value="<?=$row?>" <?=$info==$row?'selected':''?> ><?=$row?></option>

<?}?>

</select>

</td>

</tr>

<? }

}?>

<?if(($cfg->allowOnlineAttachments() && !$cfg->allowAttachmentsOnlogin())

|| ($cfg->allowAttachmentsOnlogin() && ($thisclient && $thisclient->isValid()))){

?>

<tr>

<th>Vedlegg:</th>

<td>

<input type="file" name="attachment"><font class="error">&nbsp;<?=$errors?></font>

</td>

</tr>

<?}?>

<tr height=2px><td align="left" colspan=2 >&nbsp;</td</tr>

<tr>

<td></td>

<td>

<input class="button" type="submit" name="submit_x" value="Send henvendelse">

<input class="button" type="reset" value="Reset">

<input class="button" type="button" name="cancel" value="Avbryt" onClick='window.location.href="index.php"'>

</td>

</tr>

</table>

</form>

Try replacing the following code (Line 53-59)

<?if ($thisclient && ($name=$thisclient->getSerienummer())) {

?>

<input type="hidden" name="serienummer" value="<?=$serienummer?>"><?=$serienummer?>

<?}else {?>

<input type="text" name="serienummer" size="25" value="<?=$info?>">

<?}?>

&nbsp;<font class="error">&nbsp;<?=$errors?></font>

with

<input type="text" name="subject" size="35" value="<?=$info?>">

&nbsp;<font class="error">*&nbsp;<?=$errors?></font>

Let me know if that works.

I will have to look at it more in depth Sunday or Monday. I am in a wedding today, and prob hung over tomorrow. ;-)

ofc i need to compare and check it!!

i don't take someones code and implement it without checking it first!