Jump to content

jc624

Members
  • Content Count

    60
  • Joined

  • Last visited

Community Reputation

0 Neutral

About jc624

  • Rank
    Newbie
  1. Thanks@ yeah the template that was made not by me made me add a height definition...but I'll figure that out.Thanks!
  2. Can anyone tell me why this is not aligning correctly in Safari/Firefox? The box where the cities are - trying to align them the same but it looks like one or more pixels off....Everything in this hero' section is inline css : Note: this is still work in progress so i'm just trying to fix this one page and looking at this on the Mac.landscapearchitectureboston.com/communities_andover.phpthanks@
  3. jc624

    Have users able to upload

    Yeah got it looks like i just needed user' to be included. All set thanks!
  4. I have this php login where the admin can upload like this: <?phpsession_start();if(!isset($_SESSION['logged'])){ header("Location: ../clientlogin.php"); exit;} if($_SESSION['user_type'] != 'admin'){ header("Location: home_client.php"); exit;}if(!isset($_GET['project_id'])){ exit("Need to choose a project");}include 'functions.php';$conn = openDatabaseConn();$project_id = cleanQuery($_GET['project_id']);$project_result = mysql_query("SELECT * FROM projects LEFT JOIN clients ON projects.client_id = clients.client_id WHERE project_id = $project_id", $db);if(mysql_num_rows($project_result) < 1) { header("Location: admin.php"); exit; }$project_row = mysql_fetch_assoc($project_result);?> and heres the user: <?phpsession_start();if(!isset($_SESSION['logged'])){ header("Location: ../clientlogin.php"); exit;} if(!isset($_GET['project_id'])){ exit("Need to choose a project");}include 'functions.php';$conn = openDatabaseConn();$project_id = cleanQuery($_GET['project_id']);$project_result = mysql_query("SELECT * FROM projects LEFT JOIN clients ON projects.client_id = clients.client_id WHERE project_id = $project_id", $db);$project_row = mysql_fetch_assoc($project_result);if($_SESSION['client_id'] != $project_row['client_id']) exit("You do not have permission to view this page");?>
  5. I guess that was too much here's the whole thing: <?phpsession_start();if(!isset($_SESSION['logged'])) header("Location: login.php");require 'include/functions.php'; $db = openDatabaseConn();?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html lang="en-US" xml:lang="en-US" xmlns="http://www.w3.org/1999/xhtml"><head> <title>My DB</title><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><link rel="stylesheet" type="text/css" href="css/style.css"><script type="text/javascript" src="js/script.js"></script></head><body><div id="header"> <?php include 'include/header.php'; ?></div><div id="main_content"> <div id="left_col"> <div id="nav_left"> <?php include 'include/left_nav.php'; ?> </div> </div> <div id="body"> <?php if(!isset($_POST['report'])) { ?> <h1>Report Criteria</h1> <form action="reports.php" method="post"> <input type="hidden" name="report" value="1" /> <div class="fieldset_wide"> <table class="contact_info" cellpadding="0" cellspacing="0"> <tr> <td colspan="4"> <b>Start:</b> <input onclick="cal.select(document.forms[0].date1,'date1','M/dd/yyyy'); return false;" type="text" id="date1" name="date1" style="width: 70px;" /> <a href="#" onclick="cal.select(document.forms[0].date1,'date1','M/dd/yyyy'); return false;"><img border="0" style="margin-right: 10px;" src="images/c.gif" /></a> <b>End:</b> <input onclick="cal.select(document.forms[0].date2,'date2','M/dd/yyyy'); return false;" type="text" id="date2" name="date2" style="width: 70px;" /> <a href="#" onclick="cal.select(document.forms[0].date2,'date2','M/dd/yyyy'); return false;"><img border="0" style="margin-right: 10px;" src="images/c.gif" /></a> <input type="radio" name="timeframe" value="created" checked /> Created <input type="radio" name="timeframe" value="last_activity" /> Last Activity </td> </tr> <tr> <td valign="top"> <b>Type:</b><br /> <select name="type[]" multiple> <option value="0">No Type</option> <?php $type_result = mysql_query("SELECT * FROM type", $db); while($type_row = mysql_fetch_array($type_result)) { ?> <option value="<?php echo $type_row['type_id']; ?>"><?php echo $type_row['type']; ?></option> <?php } ?> </select> </td> <td valign="top"> <b>Status:</b><br /> <select name="status[]" multiple> <option value="0">No Status</option> <?php $status_result = mysql_query("SELECT * FROM status", $db); while($status_row = mysql_fetch_array($status_result)) { ?> <option value="<?php echo $status_row['status_id']; ?>"><?php echo $status_row['status']; ?></option> <?php } ?> </select> </td> <td valign="top"> <b>Rating:</b><br /> <select name="rating[]" multiple> <option value="0">No Rating</option> <?php $rating_result = mysql_query("SELECT * FROM rating", $db); while($rating_row = mysql_fetch_array($rating_result)) { ?> <option value="<?php echo $rating_row['rating_id']; ?>"><?php echo $rating_row['rating']; ?></option> <?php } ?> </select> </td> <td valign="top"> <b>Source:</b><br /> <select name="source[]" multiple> <option value="0">No Source</option> <?php $source_result = mysql_query("SELECT * FROM source", $db); while($source_row = mysql_fetch_array($source_result)) { ?> <option value="<?php echo $source_row['source_id']; ?>"><?php echo $source_row['source']; ?></option> <?php } ?> </select> </td> </tr> <tr> <td valign="top"> <b>Location:</b><br /> <select name="location[]" multiple> <option value="0">No Preference</option> <?php $location_result = mysql_query("SELECT * FROM location", $db); while($location_row = mysql_fetch_array($location_result)) { ?> <option value="<?php echo $location_row['location_id']; ?>"><?php echo $location_row['location']; ?></option> <?php } ?> </select> </td> <td valign="top"> <b>User:</b><br /> <select name="user[]" multiple style="height: 100px;"> <option value="0">No Preference</option> <?php $user_result = mysql_query("SELECT * FROM users ORDER BY username", $db); while($user_row = mysql_fetch_array($user_result)) { ?> <option value="<?php echo $user_row['user_id']; ?>"><?php echo $user_row['username']; ?></option> <?php } ?> </select> </td> <td colspan="2" valign="top"> <b>Order By:</b><br /> <select name="orderby"> <option value="last_name">Last Name</option> <option value="type">Type</option> <option value="status">Status</option> <option value="rating">Rating</option> <option value="source">Source</option> <option value="created">Create Date</option> <option value="last_activity">Last Activity</option> </select> </td> </tr> </table> <input type="submit" name="submitBTN" value=" Run Report " /> </div> </form> <?php } else { ?> <h1>Custom Report</h1> <button onclick="location.href = 'reports.php';">New Report</button> <?php $date1 = date("Y-m-d H:i:s", strtotime($_POST['date1'])); $date2 = date("Y-m-d H:i:s", strtotime($_POST['date2'])); $type = $_POST['type']; $status = $_POST['status']; $rating = $_POST['rating']; $source = $_POST['source']; $location = $_POST['location']; $user = $_POST['user']; $sql = "SELECT * FROM leads "; $sql .= "WHERE "; //if($_SESSION['account_type'] != 1) //{ //$sql .= "(user_id = $_SESSION[user_id]) AND "; //} if(empty($_POST['date1']) || empty($_POST['date2'])) { $sql .= "($_POST[timeframe] <= NOW()) "; } else { $sql .= "($_POST[timeframe] >= '$date1' AND $_POST[timeframe] <= '$date2') "; } if(!empty($type)) { $sql .= "AND "; $sql .= "("; for($i = 0; $i < count($type); $i++) { $sql .= "type = $type[$i] "; if($i < count($type) - 1) { $sql .= "OR "; } } $sql .= ") "; } if(!empty($status)) { $sql .= "AND "; $sql .= "("; for($i = 0; $i < count($status); $i++) { $sql .= "status = $status[$i] "; if($i < count($status) - 1) { $sql .= "OR "; } } $sql .= ") "; } if(!empty($rating)) { $sql .= "AND "; $sql .= "("; for($i = 0; $i < count($rating); $i++) { $sql .= "rating = $rating[$i] "; if($i < count($rating) - 1) { $sql .= "OR "; } } $sql .= ") "; } if(!empty($source)) { $sql .= "AND "; $sql .= "("; for($i = 0; $i < count($source); $i++) { $sql .= "source = $source[$i] "; if($i < count($source) - 1) { $sql .= "OR "; } } $sql .= ") "; } if(!empty($location)) { $sql .= "AND "; $sql .= "("; for($i = 0; $i < count($location); $i++) { $sql .= "location = $location[$i] "; if($i < count($location) - 1) { $sql .= "OR "; } } $sql .= ") "; } if(!empty($user)) { $sql .= "AND "; $sql .= "("; for($i = 0; $i < count($user); $i++) { $sql .= "user_id = $user[$i] "; if($i < count($user) - 1) { $sql .= "OR "; } } $sql .= ") "; } $sql .= "ORDER BY $_POST[orderby] ASC"; $report_result = mysql_query($sql, $db); $num_rows = mysql_num_rows($report_result); ?> <div class="fieldset_wide"> <?php if(!empty($_POST['date1']) && !empty($_POST['date2'])) { ?> <b>Timeframe</b>: <?php echo $_POST['date1']; ?> to <?php echo $_POST['date2']; ?> (<?php echo ucwords(str_replace("_", " ", $_POST['timeframe'])) ;?>)<br /> <?php } ?> <?php if(!empty($type)) { ?> <b>Type:</b> <?php array_walk($type, "arrayChangeType", $db); echo implode(", ", $type); ?><br /> <?php } ?> <?php if(!empty($status)) { ?> <b>Status:</b> <?php array_walk($status, "arrayChangeStatus", $db); echo implode(", ", $status); ?><br /> <?php } ?> <?php if(!empty($rating)) { ?> <b>Rating:</b> <?php array_walk($rating, "arrayChangeRating", $db); echo implode(", ", $rating); ?><br /> <?php } ?> <?php if(!empty($source)) { ?> <b>Source:</b> <?php array_walk($source, "arrayChangeSource", $db); echo implode(", ", $source); ?><br /> <?php } ?> <?php if(!empty($location)) { ?> <b>Location:</b> <?php array_walk($location, "arrayChangeLocation", $db); echo implode(", ", $location); ?><br /> <?php } ?> <?php if(!empty($user)) { ?> <b>User:</b> <?php array_walk($user, "arrayChangeUser", $db); echo implode(", ", $user); ?><br /> <?php } ?> <br /> <b>Total Rows:</b> <?php echo $num_rows; ?> </div> <table class="home_table" cellpadding="0" cellspacing="0"> <tr> <td class="top">Name</td> <td class="top">Phone</td> <td class="top">Email</td> <td class="top">Type</td> <td class="top">Status</td> <td class="top">Rating</td> <td class="top">Created</td> <td class="top" style="border-right: 0px;">User</td> </tr> <?php $count = 1; //echo $sql; while($report_row = mysql_fetch_array($report_result)) { ?> <tr> <td <?php if(($count % 2) == 0) echo 'class="alt_row"'; ?>><a class="lead" href="lead.php?lead_id=<?php echo $report_row['lead_id']; ?>"><?php echo $report_row['last_name'] . ', ' . $report_row['first_name']; ?></a></td> <td <?php if(($count % 2) == 0) echo 'class="alt_row"'; ?>><?php echo $report_row['phone']; ?></td> <td <?php if(($count % 2) == 0) echo 'class="alt_row"'; ?>><a class="lead" href="email.php?lead_id=<?php echo $report_row['lead_id']; ?>"><?php echo $report_row['email']; ?></a></td> <td <?php if(($count % 2) == 0) echo 'class="alt_row"'; ?>><?php echo getTypeName($report_row['type'], $db); ?></td> <td <?php if(($count % 2) == 0) echo 'class="alt_row"'; ?>><?php echo getStatus($report_row['status'], $db); ?></td> <td <?php if(($count % 2) == 0) echo 'class="alt_row"'; ?>><?php echo getRating($report_row['rating'], $db); ?></td> <td <?php if(($count % 2) == 0) echo 'class="alt_row"'; ?>><?php echo date("n/d/y g:i a", strtotime($report_row['created'])); ?></td> <td <?php if(($count % 2) == 0) echo 'class="alt_row"'; ?> style="border-right: 0px;"><?php echo $report_row['user_id']; ?></td> </tr> <?php $count++; } $url_sql = urlencode($sql); ?> </table> <button onclick="location.href='export_report.php?sql=<?php echo $url_sql; ?>';">Export to Excel</button> <?php } ?> </div></div><div style="clear: both;"></div><div id="footer"> <?php include 'include/footer.php'; ?> </div></body></html>
  6. Sorry the code was too long i placed it below!Thanks birbal and TheScientist!
  7. here's the $report_result info if(!empty($user)){$sql .= "AND ";$sql .= "(";for($i = 0; $i < count($user); $i++){$sql .= "user_id = $user[$i] ";if($i < count($user) - 1){ $sql .= "OR ";}}$sql .= ") ";}$sql .= "ORDER BY $_POST[orderby] ASC"; $report_result = mysql_query($sql, $db);
  8. That will just give me this:mysql_num_rows(): supplied argument is not a valid MySQL result resource #.phpSO....<td <?php if(($count % 2) == 0) echo 'class="alt_row"'; ?><?php echo $report_row['user_id']; ?></td> I just want to know what to input here:<?php echo $report_row['user_id']; ?>how can I change this to username ('username' will define nothing)Am I just missing an edit on the result/report row?:while($report_row = mysql_fetch_array($report_result))
  9. I do but this is for the form before i hit submit so i can view the results:<select name="user[]" multiple style="height: 100px;">again I can see this in the form...but what i want to see from the results is the username. I made that td with the userid to see the results of the user that did that report...meaning in the form i can select username: joesmith....i hit submit and in the results:<?php echo $report_row['user_id']; ?>I get joesmith userid # but i want to see in there is "joesmith" the username...of course it doesn't make sense if I search for joesmith but it will make sense when i tried to filter by another query like 'date'...I hope I'm not confusing.Thanks!
  10. I have a db that when i get some results i get the user_id like this: while($report_row = mysql_fetch_array($report_result)){?><tr><td <?php if(($count % 2) == 0) echo 'class="alt_row"'; ?>><?php echo getStatus($report_row['status'], $db); ?></td><td <?php if(($count % 2) == 0) echo 'class="alt_row"'; ?>><?php echo date("n/d/y g:i a", strtotime($report_row['created'])); ?></td><td <?php if(($count % 2) == 0) echo 'class="alt_row"'; ?><?php echo $report_row['user_id']; ?></td> It works with user_id but I tried username from users in the row but still haven't had luckI have the code like this: <?php$user_result = mysql_query("SELECT * FROM users ORDER BY username", $db);while($user_row = mysql_fetch_array($user_result)){?><option value="<?php echo $user_row['user_id']; ?>"><?php echo $user_row['username']; ?></option> The db table is like this:usersand in users theres:Field:user_idusername [sELECT COUNT( * ) AS `Rows` , `username` ]first_namelast_name Anyone know how to add username in the report_row instead of showing them their userid(number)?
  11. I’d like the background image to resize proportionally as you can see the link below (this I know how to do), but then stop resizing if the user squishes the window to be much longer than it is wide(this is what I'm try to accomplish).Here's an example:http://www.jdda.com/#/homeDoes anyone have any ideas how this is done?Update:I found another example:http://www.salomon.com/uk/
  12. Anyone has any other input? I think this might have to go back to square one to eliminate those damn borders and make my life easier and just to have a background color
  13. WooW smart thinking!I did that on a test page:http://e-dialog.typepad.com/test/And I can see the bg now! Damn you height!Another weird thing is when I break it the other copy expands to the right...tdrfghrstyhrteyhtrw <br />dfgdgdfgdfg very odd..
  14. Test page...um?Well someone says it FF ksize to big for FF:http://e-dialog.typepad.com/images/left_copybigc.pngwhich I find it straight bologna....I mean I can see it in IE I thought of z-index, putting quotes, the reason I did this huge thing is because of the size varies with topics....I might have to go back to the drawing board.Thx for the input keep em coming
×
×
  • Create New...