Jump to content

jsorenson3

New Members
  • Posts

    3
  • Joined

  • Last visited

    Never

Posts posted by jsorenson3

  1. I am using the following code to fill in the blanks on an image from an online form. Everything is complete.

    However, there are several manufacturers that we have that require a specific form. We have a generic form for everyone else and 8 people that have different agreements.

    If the person filling out the form chooses one of the 8 that is listed it will know to use the other document instead of the generic one already specified

    Here is the code that i have. I have submitted only for the first file because that is the one that needs to check.

    the name of the field is Products_Sold

    If the option chosen would be Cars then it would use the generic form and would use the code as listed, but if they chose Trucks it would create the image on a different filename


    [code]
    $filename1 = "bfcmai1.JPG";
    $filename2 = "bfcmai2.JPG";
    $filename3 = "bfcmda1.jpg";
    $filename4 = "bfcmda3.jpg";



    $dest_loc = "newdlr_data";

    //ftp information to make the file
    $ftp_server = "ftpinfohere";
    $ftp_user = "user";
    $ftp_pass = "pass";



    $im = @imagecreatefromjpeg($filename1);
    $textcolor = imagecolorallocate($im, 0, 0, 0);
    $font = 'arial.ttf';
    $fontsize = "24";

    //insert text onto the page
    imagettftext($im, $fontsize, 0, 258, 383, $textcolor, $font, $Company_Name);

    imagettftext($im, $fontsize, 0, 246, 445, $textcolor, $font, $Contact_Person);
    imagettftext($im, $fontsize, 0, 912, 445, $textcolor, $font, $Title);
    imagettftext($im, $fontsize, 0, 152, 508, $textcolor, $font, $Address_1);
    imagettftext($im, $fontsize, 0, 821, 508, $textcolor, $font, $Address_2);


    imagettftext($im, $fontsize, 0, 101, 570, $textcolor, $font, $City);
    imagettftext($im, $fontsize, 0, 835, 570, $textcolor, $font, $State);
    imagettftext($im, $fontsize, 0, 1153, 570, $textcolor, $font, $Zip);

    imagettftext($im, $fontsize, 0, 231, 632, $textcolor, $font, $Area_Code);
    imagettftext($im, $fontsize, 0, 312, 632, $textcolor, $font, $Telephone_Number);

    imagettftext($im, $fontsize, 0, 650, 630, $textcolor, $font, $Fax_Area_Code);
    imagettftext($im, $fontsize, 0, 740, 630, $textcolor, $font, $Fax_Telephone_Number);

    imagettftext($im, $fontsize, 0, 1153, 630, $textcolor, $font, $Applicant_Email);

    imagettftext($im, $fontsize, 0, 450, 709, $textcolor, $font, $States_Business);
    imagettftext($im, $fontsize, 0, 341, 878, $textcolor, $font, $Year_Company_Started);
    imagettftext($im, $fontsize, 0, 805, 878, $textcolor, $font, $Fed_ID);
    imagettftext($im, $fontsize, 0, 441, 940, $textcolor, $font, $Products_Sold);
    imagettftext($im, $fontsize, 0, 494, 1002, $textcolor, $font, $Average_Sale_Price);
    imagettftext($im, $fontsize, 0, 1242, 1002, $textcolor, $font, $Units_Sold);

    imagettftext($im, $fontsize, 0, 140, 1470, $textcolor, $font, $Owner_1_Name);
    imagettftext($im, $fontsize, 0, 255, 1544, $textcolor, $font, $Owner_1_Home_Address);
    imagettftext($im, $fontsize, 0, 957, 1544, $textcolor, $font, $Owner_1_City);
    imagettftext($im, $fontsize, 0, 1316, 1544, $textcolor, $font, $Owner_1_State);
    imagettftext($im, $fontsize, 0, 1503, 1544, $textcolor, $font, $Owner_1_Zip);
    imagettftext($im, $fontsize, 0, 296, 1619, $textcolor, $font, $Owner_1_Social_Security_Number);
    imagettftext($im, $fontsize, 0, 1074, 1619, $textcolor, $font, $Owner_1_Home_Phone);
    imagettftext($im, $fontsize, 0, 1143, 1470, $textcolor, $font, $Owner_1_Percent_Owned);
    imagettftext($im, $fontsize, 0, 1496, 1470, $textcolor, $font, $Owner_1_Years_Owned);

    imagettftext($im, $fontsize, 0, 141, 1694, $textcolor, $font, $Owner_2_Name);
    imagettftext($im, $fontsize, 0, 257, 1770, $textcolor, $font, $Owner_2_Home_Address);
    imagettftext($im, $fontsize, 0, 957, 1770, $textcolor, $font, $Owner_2_City);
    imagettftext($im, $fontsize, 0, 1318, 1770, $textcolor, $font, $Owner_2_State);
    imagettftext($im, $fontsize, 0, 1505, 1770, $textcolor, $font, $Owner_2_Zip);
    imagettftext($im, $fontsize, 0, 299, 1845, $textcolor, $font, $Owner_2_Social_Security_Number);
    imagettftext($im, $fontsize, 0, 1076, 1845, $textcolor, $font, $Owner_2_Home_Phone);
    imagettftext($im, $fontsize, 0, 1144, 1694, $textcolor, $font, $Owner_2_Percent_Owned);
    imagettftext($im, $fontsize, 0, 1496, 1694, $textcolor, $font, $Owner_2_Years_Owned);

    imagettftext($im, $fontsize, 0, 142, 1917, $textcolor, $font, $Owner_3_Name);
    imagettftext($im, $fontsize, 0, 259, 1995, $textcolor, $font, $Owner_3_Home_Address);
    imagettftext($im, $fontsize, 0, 958, 1995, $textcolor, $font, $Owner_3_City);
    imagettftext($im, $fontsize, 0, 1317, 1995, $textcolor, $font, $Owner_3_State);
    imagettftext($im, $fontsize, 0, 1504, 1995, $textcolor, $font, $Owner_3_Zip);
    imagettftext($im, $fontsize, 0, 298, 2069, $textcolor, $font, $Owner_3_Social_Security_Number);
    imagettftext($im, $fontsize, 0, 1076, 2069, $textcolor, $font, $Owner_3_Home_Phone);
    imagettftext($im, $fontsize, 0, 1144, 1917, $textcolor, $font, $Owner_3_Percent_Owned);
    imagettftext($im, $fontsize, 0, 1496, 1917, $textcolor, $font, $Owner_3_Years_Owned);

    //If Licensed
    if($Licensed_State == "Yes"){
        imagettftext($im, $fontsize, 0, 610, 780, $textcolor, $font, "X");
    }
    if($Licensed_State == "No"){
        imagettftext($im, $fontsize, 0, 757, 780, $textcolor, $font, "X");
    }    

    //Business Type

    if($Type_of_Business == "Proprietorship"){
        imagettftext($im, $fontsize, 0, 533, 1080, $textcolor, $font, "X");
    }
    if($Type_of_Business == "Partnership"){
        imagettftext($im, $fontsize, 0, 533, 1115, $textcolor, $font, "X");
    }
    if($Type_of_Business == "Corporation"){
        imagettftext($im, $fontsize, 0, 832, 1080, $textcolor, $font, "X");
    }
    if($Type_of_Business == "LLC"){
        imagettftext($im, $fontsize, 0, 832, 1115, $textcolor, $font, "X");
    }

    //How Heard Options

    if($How_Heard == "Direct Mail"){
        imagettftext($im, $fontsize, 0, 484, 1192, $textcolor, $font, "X");
    }
    if($How_Heard == "Manufacturer Referral"){
        imagettftext($im, $fontsize, 0, 484, 1230, $textcolor, $font, "X");
    }
    if($How_Heard == "Magazine Ad"){
        imagettftext($im, $fontsize, 0, 484, 1267, $textcolor, $font, "X");
    }
    if($How_Heard == "Trade Show"){
        imagettftext($im, $fontsize, 0, 746, 1192, $textcolor, $font, "X");
    }
    if($How_Heard == "BFC Website"){
        imagettftext($im, $fontsize, 0, 946, 1230, $textcolor, $font, "X");
    }
    if($How_Heard == "Dealer Referral"){
        imagettftext($im, $fontsize, 0, 1344, 1192, $textcolor, $font, "X");
    }
    if($How_Heard == "Other Website"){
        imagettftext($im, $fontsize, 0, 1248, 1230, $textcolor, $font, "X");
    }
    if($How_Heard == "Other"){
        imagettftext($im, $fontsize, 0, 1248, 1267, $textcolor, $font, "X");
    }

    //How Heard Options

    imagettftext($im, $fontsize, 0, 940, 1267, $textcolor, $font, $Choice_Magazine_Ad);
    imagettftext($im, $fontsize, 0, 1142, 1192, $textcolor, $font, $Choice_Trade_Show);
    imagettftext($im, $fontsize, 0, 1404, 1267, $textcolor, $font, $Choice_Other);


    //header("Content-type: image/jpeg");
    $filename = "$dest_loc/$Company_Name-Pg1.jpg";
    $file_ext = "";
    $flag_check = false;
    while ($flag_check === false){
        if(!($flag_check = checkfile($filename))){
            $file_ext = $file_ext."a";
            $filename = "$dest_loc/$Company_Name-$file_ext-Pg1.jpg";
        }
    }

    $image_upload = imagejpeg($im, $filename);

    imagedestroy($im);

    [/code]
  2. Yes, that is how i probably would set it up. The table already has information such as a dealer number, address, etc.

    If a field would be added I would call it allow credit app for example and have it be either a Y or N

    Then I would need to query that table and if it is set to N, then the link on the navigation menu would need to disappear

    Lets say I am basing the navigation menu off of this.

    I want to be able to disable the newsletters link for example if the dealer would login and have N in the field i create



    <?php
    return array (
    "home:Home" => array ("block:index:Company Name"),
    "history:History" => array ("block:index:Company Name"),
    "payment:Make a Payment" => array("block:index:Make a Payment"),
    "newdeal:New Dealer Inquiry" => array ("dealer_inquire:index:Master Account Information"),
    "dealers:Dealer Login" => array ("dealer_forward:index:Registered Dealer Login"),
    "case:Case Studies and Testimonials" => array ("block:index:Case Studies and Testimonials"),
    "newsletters:Newsletters" => array ("block:index:Newsletters"),
    "press:Press Releases" => array ("block:index:Press Releases"),
    "special:Special Promotions" => array ("block:index:Special Promotions"),
    "careers:Careers" => array ("block:index:Careers"),
    "contact:Contact Us" => array ("block:index:Contact Information"),
    );
    ?>

  3. I need a little direction, for some reason I am stuck.

    I administer a website for a finance company. There is a secure section where dealers login. The login information is stored in a table.

    The navigation links are set by using $catArray = include("dealer_nav.php"); for example

    in the dealer_nav there is a link that I would like to add a field in the table to say Y or N to allow applications to be processed online and then when they login it would check for this and disable that link in the navigation

    If anything needs clarification feel free to email me or reply here and I will try to help the best I can

    Thank you for your assistance in advance

    Justin
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.