I need a modification done to an existing php page.
I have uploaded the page. Currently the script does an sql query to determine the domain name to display
$query_domainlookup = "SELECT * FROM domain_names WHERE client_id = '$this_user[client_id]'";
$domainlookup = mysql_query($query_domainlookup, $dbh) or die(mysql_error());
$totalRows_domainlookup = mysql_num_rows($domainlookup);
Then the output
<?
while($row_domainlookup = mysql_fetch_array($domainlookup)) {
?>
<ul>
<li type=square><a href="http://<? echo $row_domainlookup[domain_name]; ?>/cpanel/">Control Panel Login for <? echo $row_domainlookup[domain_name]; ?></a><br>
I need this query to be changed and the output modified.
I have written the query to retrive the required information from the database. The new query is
SELECT CASE [login to view URL]
WHEN 'mod_cpanel'
THEN '/cpanel/'
WHEN 'mod_diradmin'
THEN ':2222/'
ELSE 'cp.'
END , [login to view URL]
FROM client_package c
, account_details a
WHERE c.cp_id = a.cp_id
AND c.client_id = a.client_id
AND c.pack_id > 1
AND c.client_id = 28
The output would then be in two formats depending on the results:
If /cpanel/ or :2222/ ore returned then the output would be in the format of:
domain/cpanel/ or domain:2222/
If neither of those values are returned then the format would be
[login to view URL]
The Domain also needs to be kept as a separate variable so it can be output on it's own.
I have uploaded the current page that I am using
I hope that is clear but if you have any questions please let me know
## Deliverables
Completed script that produces the required output to be displayed on the web page
## Platform
Linux