Page 2 of 4

Posted: Wed Aug 02, 2006 4:06 pm
by RobertGonzalez
Both of you, naughty...
Image

Ninja, for you...
Image Image

Posted: Wed Aug 02, 2006 6:02 pm
by AKA Panama Jack
The Ninja Space Goat wrote:This really goes against my beliefs, but I censored it for you wft. :evil:
Eck!

I think that is worse. 8O

His nipple is SMILING at me!

My eyes! My EYES!

:twisted:

Posted: Wed Aug 02, 2006 6:48 pm
by RobertGonzalez
Smiling Nipples... I think I thought of that name for a band once.

Posted: Wed Aug 02, 2006 6:49 pm
by feyd
Image

Posted: Wed Aug 02, 2006 10:50 pm
by alex.barylski
Welcome to the world of a PHP freelancer :P

So many times have I had to fix "something simple"...

Here is what I do...

Explain, sure it's a trivial fix once I find it, but that might take time due to the poor design, etc...

Also, know that, the code base is poorly designed and written and every fix is actually an adhoc hack, which will likley cause more bugs in the future.

At this point you may want to refer him to a non-biased third party PHP developer, to get another opinion...

Posted: Wed Aug 02, 2006 11:03 pm
by wtf
Ninja,

You have completely and forever changed perception of a :D. Man, that's one of the most perverted :D I've ever seen. Your nipple didn't bother me at all. It was mosly the facial expression of my boss when he walked by and stared at your avatar for a minute. Any and I mean any explanation that this was a PHP board was pointless. Don't get me wrong I didn't get in trouble but I think my boss liked your striking pose. Keep looking for an email.

~w

Posted: Thu Aug 03, 2006 12:40 am
by timvw
When i see posts from people that are stuck with some crappy code... I always wonder where the good code is? So many people claim to write good, maintainable code... Yet noone ever seems to find that code...

Posted: Thu Aug 03, 2006 2:56 am
by AKA Panama Jack
timvw wrote:When i see posts from people that are stuck with some crappy code... I always wonder where the good code is? So many people claim to write good, maintainable code... Yet noone ever seems to find that code...
Sniff... Image I try...

Posted: Thu Aug 03, 2006 3:23 am
by GM
I think a lot of it comes down to individual style. What is neat code for one person is messy code for another. What is readable for one person is illegible for another. What is necessary for one person is a waste of bytes for another.

In general, if you look at any big script that is not written by yourself, you always find yourself thinking "Why has he indented it like this?". "Why hasn't he split that long string onto multiple lines?". etc. etc.

Posted: Thu Aug 03, 2006 10:01 am
by Luke
GM wrote:I think a lot of it comes down to individual style. What is neat code for one person is messy code for another. What is readable for one person is illegible for another. What is necessary for one person is a waste of bytes for another.

In general, if you look at any big script that is not written by yourself, you always find yourself thinking "Why has he indented it like this?". "Why hasn't he split that long string onto multiple lines?". etc. etc.
That isn't what I'm talking about... let me post some of the code I have to deal with hang on...

Code: Select all

<?
 echo'<style type="text/css">
<!--
@import url("../normal.css");
-->
</style>';
//require_once("./projfunc/data_func.php");
require_once("alerts.js");
require_once("./projfunc/selqueryPage.php");

//include ("style.css");
function redate($date)
{
	$data=explode('/',$date);
	$mm=$data[0];
	$dd=$data[1];
	$yyyy=$data[2];
	$newDate=$yyyy."-".$mm."-".$dd;
	
	return $newDate;
}



//$compid=$_REQUEST["conum"];
//$numrows=$_REQUEST["numrows"];
//$typedev=$_REQUEST['typedev'];
//$zoning=$_REQUEST['zoning'];
//$F=$_REQUEST["F"];


//Start Pagination process				

$approve=$_REQUEST['approve'];

if(!isset($_GET['page'])){
	$numrows=$_REQUEST['numrows'];
}else {
	$numrows=$_GET['numrows'];
}
if(!isset($_REQUEST['numrows'])){
	$numrows=10;
}else {
	$numrows=$_GET['numrows'];
}
if(!isset($approve)){
 $approve="NO";
}else {
	$approve=$_GET['approve'];
}
if(!isset($_GET['page'])){
	$page=1;
}else {
	$page=$_GET['page'];
}

$from=(($page*$numrows)-$numrows);
//echo "from=".$from;
//echo "numrows=".$numrows;
 $compInfo=propList(0,100000,'',$typedev,$zoning,$compid,$approve);
$Tmemdata=count($compInfo);


if($numrows=="all"){$numrows=100000000;}
$Tpages=ceil($Tmemdata/$numrows);
echo"<table width=800 class="bodycopy" cellpadding=7>
            <tr>
                <td>Select a Page<br />";
if($page>1){
	$prev=($page -1);
	
	echo"<a href="".$_SERVER['PHP_SELF']."? page=".$prev."&numrows=".$numrows."&compid=".$compid."&zoning=".$zoning."&typedev=".$typedev."&approve=".$approve."&F=2"><<Previous</a>&nbsp;";
	
}
for($i=1;$i<=$Tpages;$i++){
	if(($page)==$i){
		echo $i."&nbsp;";
	}else {
		echo "<a href="".$_SERVER['PHP_SELF']."?page=".$i."&numrows=".$numrows."&compid=".$compid."&zoning=".$zoning."&typedev=".$typedev."&approve=".$approve."&F=2">$i</a>&nbsp;";
	}
}

if($page<$Tpages){
	$next=($page+1);
	echo"<a href="".$_SERVER['PHP_SELF']."?page=".$next."&numrows=".$numrows."&compid=".$compid."&zoning=".$zoning."&typedev=".$typedev."&approve=".$approve."&F=2">Next>></a>";
}

echo"</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td align=RIGHT><a href="search.htm" ><img src="..\\images\\newsearch.gif" border=0></td></tr></table>";

//end paganation process


//echo $from.",".$numrows.",".$typedev.",".$zoning.",".$compid.",".$approve;

echo '<form name=compsearch method="post" action="">';
if(!$compInfo=propList($from,$numrows,'',$typedev,$zoning,$compid,$approve)){
	echo'<TABLE width="800"  class="bodycopy"  border="0" cellpadding="7">
  <tr><td>Sorry, There are no unapproved properties at this time. <br> <br>
       Would you like to see a list of all properties?<br><a href="complist.php?approve=YES"><img src="../images/viewprop.gif" border=0></img></a></td></tr>
       </table> ';
}else{
        echo'<TABLE width="800"  class="bodycopy"  border="0" cellpadding="7">

                     <tr>

                     </tr>
                    
           <TR>
               <td>
               <b>Address</b>
               </td>
               <td>
               <b>Type Development</b>
               </td>
               <td>
               <b>Reference Name</b>
               </td>

               <td>
               &nbsp;
               </td>
               <td>
               &nbsp;
               </td>
               </tr>';
        foreach ($compInfo as $data){
          $compid=$data['cell_0'];
          $add_id=$data['cell_9'];
                 echo "<tr>";
                 echo "<td align="LEFT">".$data['cell_4']."</td>";
                 echo "<td align="LEFT">".$data['cell_1']."</td>";
                 echo "<td align="LEFT">".$data['cell_5']."</td>";


echo'			<TD align="RIGHT">
				<a href=./PropEditEntry.php?compid='.$compid.'&F=2"><img src=".\images\edit-approve.gif" border=0></img></a>
				</td>
				<TD align="RIGHT">
				 <a href="javascript:confirm_ex(\'./PropDeleteEntry.php?compid='.$compid.'\',\'Clicking OK will permantly\n\n Remove this data, ARE YOU SURE YOU WANT TO DO THIS???\');"><img src=".\images\deleteprop.gif" border=0></img></a>
				</td>
				
			</tr> ';

echo "
                     <tr>
                        <td>
                         &nbsp;
                        </td>

                     </tr>
                    ";

        }
 echo"     <tr>
                <td>

                  Would you like to see a list of all properties?<br><a href="complist.php?approve=YES"><img src="./images/viewprop.gif" border=0></img></a>
                 </td>
             </tr> ";
 echo' 
	</table>';

echo' </form>';
}
?>

Posted: Thu Aug 03, 2006 10:16 am
by Charles256
you call that crappy?! Ha!!!! i'd rejoice for that code..latest batch of code I had to work on I offered the guy a refund half way through just because I didn't want to do it anymore.

Posted: Thu Aug 03, 2006 10:16 am
by Ree
I would start to cry if someone made me work with something like that.

Posted: Thu Aug 03, 2006 10:19 am
by jayshields
That's nothing, didn't you see my post in the I hate osCommerce thread?

Posted: Thu Aug 03, 2006 10:20 am
by Luke
yea, that was insanely crappy jay. This is not the worst of it, but it's what I am working on right now, so I posted it.

Posted: Thu Aug 03, 2006 10:46 am
by MrPotatoes
jayshields wrote:That's nothing, didn't you see my post in the I hate osCommerce thread?
oh
my
god

that's the worst that i've ever seen. i might even cry lol

also on the OS Commerse thing, there is Zen-Cart. it's better but not by much. it's what i'm working with now and i'd rather would have written my own *god*