Page 1 of 2 12 LastLast
Results 1 to 10 of 20

Thread: Froogle Problem, Have installed but am getting errors

  1. #1
    Join Date
    Mar 2006
    Posts
    121

    Default Froogle Problem, Have installed but am getting errors

    Hey guys I've sort of done everything right but after editing the froogle.php file I'm getting this error.........

    Code:
    mysql_connect(): Access denied for user 'fukuokaf_Nigel '@'localhost' (using password: YES) in /home/fukuokaf/public_html/tsurishopjapan/admin/froogle.php on line 109
    Error when connecting itself to the data base
    I've made the user "fukuokaf Nigel" to have all privilages and has a correct new password. What's up and why won't it connect to my SQL database?

    Thanks,

    Nigel

  2. #2
    Join Date
    Feb 2006
    Location
    Somewhere where I don't know where I am
    Posts
    2,155

    Default

    You've probably already done this, but just to make sure, you have added that user to that specific database. You said that you created the user with all privileges, but did you add the user to that database? Sometime I forget to do that.
    Sign Up Now!
    Unlimited Storage, Unlimited Transfer, Host Unlimited domain names, 1 Free Domain Name
    BlueHost Features | BlueHost Help Desk | Become a BlueHost Affiliate | BlueHost CEO Blog
    (888) 401-4678 | Create a support ticket

  3. #3
    Join Date
    Mar 2006
    Posts
    121

    Default

    yeah I've set up my database correctly....

    Here's what it looks like:
    fukuokaf_osc2 (this is for my store OS COMMERCE)
    Users in osc2
    fukuokaf_Nigel (Privileges: ALL PRIVILEGES)

    Connection Strings
    Perl $dbh = DBI->connect("DBI:mysql:fukuokaf_osc2:localhost","fuku okaf_Nigel","<PASSWORD HERE>");
    PHP $dbh=mysql_connect ("localhost", "fukuokaf_Nigel", "<PASSWORD HERE>") or die ('I cannot connect to the database because: ' . mysql_error());
    mysql_select_db ("fukuokaf_osc2");

    Do you think it's a coding problem? My friend set up the same thing on his site and was no problem. I even took his php file and just edited out the things I was suposed to edit out.

    If you think it's a good idea I can post the coding here minus some key passwords and stuff.

    Nigel

  4. #4
    Join Date
    Feb 2006
    Location
    Somewhere where I don't know where I am
    Posts
    2,155

    Default

    Yeah lets take a look at it. You can post it here, or PM me
    Sign Up Now!
    Unlimited Storage, Unlimited Transfer, Host Unlimited domain names, 1 Free Domain Name
    BlueHost Features | BlueHost Help Desk | Become a BlueHost Affiliate | BlueHost CEO Blog
    (888) 401-4678 | Create a support ticket

  5. #5
    Join Date
    Mar 2006
    Posts
    121

    Default

    Ok here's the code:

    Part 1
    Code:
    <?php
    //  Title: Froogle Data Feeder 1.62
    //  Author: Calvin K
    //  Contact: calvink@conceptulanetworking.com
    //  Organization: Conceptual Networking
    //  Last Update: 12/21/05
    
    //
    // This feeder has been revised to work with Ultimate SEO URLs 2.1d (
    //http://www.oscommerce.com/community/contributions,2823)
    //
    
    // Change to 'false' to disable the use of SEO
    define('SEO_ENABLED','false');
    
    if(SEO_ENABLED=='true'){
      //********************
      // Modification for SEO
      // Since the ultimate SEO was only installed on the public side, we will include our files from there.
      require_once('../includes/configure.php');
      require_once('../includes/filenames.php');
      require_once('../includes/database_tables.php');
      $languages_id = 1;   // CHANGEME - Change this to the id of your language.  BY default 1 is english
    
    
      include_once('../' .DIR_WS_CLASSES . 'seo.class.php');
      $seo_urls = new SEO_URL($languages_id);
    
      function tep_href_link($page = '', $parameters = '', $connection = 'NONSSL', $add_session_id = true, $search_engine_safe = true) {
         global $seo_urls;
         return $seo_urls->href_link($page, $parameters, $connection, $add_session_id);
      }
    }
    
    //********************
    
    //  Start TIMER
    //  -----------
    $stimer = explode( ' ', microtime() );
    $stimer = $stimer[1] + $stimer[0];
    //  -----------
    
    
    $OutFile = "../feeds/paquins_s7_dion_ne_jp.txt"; //"CHANGEME-full-path-to-file-with-777-dir-and-file-permissions.fr-outfile.txt";
    $destination_file = "paquins_s7_dion_ne_jp.txt";  //"CHANGEME-filename-to-upload-to-froogle.txt" ;
    $source_file = $OutFile;
    $imageURL = 'http://www.fukuokafishingadventures.com/tsurishopjapan/images/';
    if(SEO_ENABLED=='true'){
       $productURL = 'product_info.php';   // ***** Revised for SEO
        $productParam = "products_id=";   // ***** Added for SEO
    }else{
       $productURL = 'http://www.fukuokafishingadventures.com/tsurishopjapan/product_info.php ?products_id=';
    }
    
    $already_sent = array();
    
    if(SEO_ENABLED=='true'){
      $home = localhost;          //  ****** revised these because we can....
      $user=fukuokaf_XXXX;
      $pass=XXXXXX;
      $base=fukuokaf_Nigel ;
    }else{
      $home = "localhost" ;
      $user="fukuokaf_Nigel ";
      $pass="XXXXX";
      $base="fukuokaf_XXXX ";
    }
    
    $ftp_server = "hedwig.google.com" ;
    $ftp_user_name = "tsurishopjapan";
    $ftp_user_pass = "XXXXXXXX";
    $ftp_directory = ""; // leave blank for froogle
    
    $taxRate = 0; //default = 0 (e.g. for 17.5% tax use "$taxRate = 17.5;")
    $taxCalc = ($taxRate/100) + 1;  //Do not edit
    $convertCur = true; //default = false
    $curType = "USD"; // Converts Currency to any defined currency (eg. USD, EUR, GBP)
    if($convertCur)
    {
       if(SEO_ENABLED=='true'){
           $productParam="currency=" . $curType . "&products_id=";
       }else{
           $productURL = "http://www.fukuokafishingadventures.com/tsurishopjapan/product_info.php ?currency=" . $curType . "&products_id=";  //where CURTYPE is your currency type (eg. USD, EUR, GBP)
       }
    }
    
    //START Advance Optional Values
    
    //(0=False 1=True) (optional_sec must be enabled to use any options)
    $optional_sec = 0;
    $instock = 0;
    $shipping = 0;
        $lowestShipping = "4.95";  //this is not binary.
    $brand = 0;
    $upc = 0;   //Not supported by default osC
    $manufacturer_id = 0;  //Not supported by default osC
    $product_type = 0;
    $currency = 0;
        $default_currency = "USD";  //this is not binary.
    $feed_language = 0;
        $default_feed_language = "en";  //this is not binary.
    $ship_to = 0;
        $default_ship_to = "ALL"; //this is not binary, not supported by default osC for individual products.
    $ship_from = 0;
        $default_ship_from = "JPN"; //this is not binary, not supported by default osC for individual products.
    
    //END of Advance Optional Values
    
    if (!($link=mysql_connect($home,$user,$pass)))
    {
    echo "Error when connecting itself to the data base";
    exit();
    }
    if (!mysql_select_db( $base , $link ))
    {
    echo "Error the data base does not exist";
    exit();
    }
    
    $sql = "
    SELECT concat( '" . $productURL . "' ,products.products_id) AS product_url,
    products_model AS prodModel, products_weight,
    manufacturers.manufacturers_name AS mfgName,
    manufacturers.manufacturers_id,
    products.products_id AS id,
    products_description.products_name AS name,
    products_description.products_description AS description,
    products.products_quantity AS quantity,
    products.products_status AS prodStatus,
    FORMAT( IFNULL(specials.specials_new_products_price, products.products_price) * " . $taxCalc . ",2) AS price,
    CONCAT( '" . $imageURL . "' ,products.products_image) AS image_url,
    products_to_categories.categories_id AS prodCatID,
    categories.parent_id AS catParentID,
    categories_description.categories_name AS catName
    FROM categories,
    categories_description,
    products,
    products_description,
    products_to_categories
    
    left join manufacturers on ( manufacturers.manufacturers_id = products.manufacturers_id )
    left join specials on ( specials.products_id = products.products_id AND ( ( (specials.expires_date > CURRENT_DATE) OR (specials.expires_date = 0) ) AND ( specials.status = 1 ) ) )
    
    WHERE products.products_id=products_description.products_id
    AND products.products_id=products_to_categories.products_id
    AND products_to_categories.categories_id=categories.categories_id
    AND categories.categories_id=categories_description.categories_id
    ORDER BY
    products.products_id ASC
    ";
    
    
    $catInfo = "
    SELECT
    categories.categories_id AS curCatID,
    categories.parent_id AS parentCatID,
    categories_description.categories_name AS catName
    FROM
    categories,
    categories_description
    WHERE categories.categories_id = categories_description.categories_id
    ";
    
    function findCat($curID, $catTempPar, $catTempDes, $catIndex)
    {
        if( (isset($catTempPar[$curID])) && ($catTempPar[$curID] != 0) )
        {
            if(isset($catIndex[$catTempPar[$curID]]))
            {
                $temp=$catIndex[$catTempPar[$curID]];
            }
            else
            {
                $catIndex = findCat($catTempPar[$curID], $catTempPar, $catTempDes, $catIndex);
                $temp = $catIndex[$catTempPar[$curID]];
            }
        }
        if( (isset($catTempPar[$curID])) && (isset($catTempDes[$curID])) && ($catTempPar[$curID] == 0) )
        {
            $catIndex[$curID] = $catTempDes[$curID];
        }
        else
        {
            $catIndex[$curID] = $temp . " > " . $catTempDes[$curID];
        }
        return $catIndex;
    
    }
    
    $catIndex = array();
    $catTempDes = array();
    $catTempPar = array();
    $processCat = mysql_query( $catInfo )or die( $FunctionName . ": SQL error " . mysql_error() . "| catInfo = " . htmlentities($catInfo) );
    while ( $catRow = mysql_fetch_object( $processCat ) )
    {
        $catKey = $catRow->curCatID;
        $catName = $catRow->catName;
        $catParID = $catRow->parentCatID;
        if($catName != "")
        {
            $catTempDes[$catKey]=$catName;
            $catTempPar[$catKey]=$catParID;
        }
    }
    
    foreach($catTempDes as $curID=>$des)  //don't need the $des
    {
        $catIndex = findCat($curID, $catTempPar, $catTempDes, $catIndex);
    }
    
    $_strip_search = array(
    "![\t ]+$|^[\t ]+!m", // remove leading/trailing space chars
    '%[\r\n]+%m'); // remove CRs and newlines
    $_strip_replace = array(
    '',
    ' ');
    $_cleaner_array = array(">" => "> ", "&reg;" => "", "®" => "", "&trade;" => "", "™" => "", "\t" => "", "    " => "");
    
    if ( file_exists( $OutFile ) )
    unlink( $OutFile );
    
    $output = "product_url \t name \t description \t price \t image_url \t category \t offer_id";
    
    //create optional section
    if($optional_sec == 1)
    {
        if($instock == 1)
            $output .= "\t instock ";
        if($shipping == 1)
            $output .= "\t shipping ";
        if($brand == 1)
            $output .= "\t brand ";
        if($upc == 1)
            $output .= "\t upc ";
        if($manufacturer_id == 1)
            $output .= "\t manufacturer_id ";
        if($product_type == 1)
            $output .= "\t product_type ";
        if($currency == 1)
            $output .= "\t currency ";
        if($feed_language == 1)
            $output .= "\t language ";
        if($ship_to == 1)
            $output .= "\t ship_to ";
        if($ship_from == 1)
            $output .= "\t ship_from ";
    }
    $output .= "\n";
    
    
    $result=mysql_query( $sql )or die( $FunctionName . ": SQL error " . mysql_error() . "| sql = " . htmlentities($sql) );

  6. #6
    Join Date
    Mar 2006
    Posts
    121

    Default

    Part 2

    Code:
    //Currency Information
    if($convertCur)
    {
        $sql3 = "
        SELECT
        currencies.value AS curUSD
        FROM
        currencies
        WHERE currencies.code = '$curType'
        ";
    
        $result3=mysql_query( $sql3 )or die( $FunctionName . ": SQL error " . mysql_error() . "| sql3 = " . htmlentities($sql3) );
        $row3 = mysql_fetch_object( $result3 );
    }
    
    $loop_counter = 0;
    
    while( $row = mysql_fetch_object( $result ) )
    {
        if (isset($already_sent[$row->id])) continue; // if we've sent this one, skip the rest of the while loop
    
        if( $row->prodStatus == 1 || ($optional_sec == 1 && $instock == 1) )
        {
    
            if($convertCur)
            {
                $row->price = ereg_replace("[^.0-9]", "", $row->price);
                $row->price = $row->price *  $row3->curUSD;
                $row->price = number_format($row->price, 2, '.', ',');
            }
    
            if(SEO_ENABLED=='true'){
                    $output .= tep_href_link($productURL,$productParam . $row->id) . "\t" .
                    preg_replace($_strip_search, $_strip_replace, strip_tags( strtr($row->name, $_cleaner_array) ) ) . "\t" .
                    preg_replace($_strip_search, $_strip_replace, strip_tags( strtr($row->description, $_cleaner_array) ) ) . "\t" .
                    $row->price . "\t" .
                    $row->image_url . "\t" .
                    $catIndex[$row->prodCatID] . "\t" .
                    $row->id;
            }else{
              $output .= $row->product_url . "\t" .
              preg_replace($_strip_search, $_strip_replace, strip_tags( strtr($row->name, $_cleaner_array) ) ) . "\t" .
              preg_replace($_strip_search, $_strip_replace, strip_tags( strtr($row->description, $_cleaner_array) ) ) . "\t" .
              $row->price . "\t" .
              $row->image_url . "\t" .
              $catIndex[$row->prodCatID] . "\t" .
              $row->id;
            }
    
        //optional values section
        if($optional_sec == 1)
        {
            if($instock == 1)
            {
                if($row->prodStatus == 1)
                {
                    $prodStatusOut = "Y";
                }
                else
                {
                    $prodStatusOut = "N";
                }
                $output .= " \t " . $prodStatusOut;
            }
            if($shipping == 1)
                $output .= " \t " . $lowestShipping;
            if($brand == 1)
                $output .= " \t " . $row->mfgName;
            if($upc == 1)
                $output .= " \t " . "Not Supported";
            if($manufacturer_id == 1)
                $output .= " \t " . "Not Supported";
            if($product_type == 1)
            {
                $catNameTemp = strtolower($catName);
                if($catNameTemp == "books")
                    $productTypeOut = "book";
                else if($catNameTemp == "music")
                    $productTypeOut = "music";
                else if($catNameTemp == "videos")
                    $productTypeOut = "video";
                else
                    $productTypeOut = "other";
    
                $output .= " \t " . $productTypeOut;
            }
            if($currency == 1)
                $output .= " \t " . $default_currency;
            if($feed_language == 1)
                $output .= " \t " . $default_feed_language;
            if($ship_to == 1)
                $output .= " \t " . $default_ship_to;
            if($ship_from == 1)
                $output .= " \t " . $default_ship_from;
        }
        $output .= " \n";
        }
        $already_sent[$row->id] = 1;
    
    
        $loop_counter++;
        if ($loop_counter>750) {
        $fp = fopen( $OutFile , "a" );
        $fout = fwrite( $fp , $output );
        fclose( $fp );
        $loop_counter = 0;
        $output = "";
     }
    }
    
    $fp = fopen( $OutFile , "a" );
    $fout = fwrite( $fp , $output );
    fclose( $fp );
    echo "File completed: <a href=\"" . $OutFile . "\" target=\"_blank\">" . $destination_file . "</a><br>\n";
    chmod($OutFile, 0777);
    
    //Start FTP to Froogle
    
    function ftp_file( $ftpservername, $ftpusername, $ftppassword, $ftpsourcefile, $ftpdirectory, $ftpdestinationfile )
    {
    // set up basic connection
    $conn_id = ftp_connect($ftpservername);
    if ( $conn_id == false )
    {
    echo "FTP open connection failed to $ftpservername <BR>\n" ;
    return false;
    }
    
    // login with username and password
    $login_result = ftp_login($conn_id, $ftpusername, $ftppassword);
    
    // check connection
    if ((!$conn_id) || (!$login_result)) {
    echo "FTP connection has failed!<BR>\n";
    echo "Attempted to connect to " . $ftpservername . " for user " . $ftpusername . "<BR>\n";
    return false;
    } else {
    echo "Connected to " . $ftpservername . ", for user " . $ftpusername . "<BR>\n";
    }
    
    if ( strlen( $ftpdirectory ) > 0 )
    {
    if (ftp_chdir($conn_id, $ftpdirectory )) {
    echo "Current directory is now: " . ftp_pwd($conn_id) . "<BR>\n";
    } else {
    echo "Couldn't change directory on $ftpservername<BR>\n";
    return false;
    }
    }
    
    ftp_pasv ( $conn_id, true ) ;
    // upload the file
    $upload = ftp_put( $conn_id, $ftpdestinationfile, $ftpsourcefile, FTP_ASCII );
    
    // check upload status
    if (!$upload) {
    echo "$ftpservername: FTP upload has failed!<BR>\n";
    return false;
    } else {
    echo "Uploaded " . $ftpsourcefile . " to " . $ftpservername . " as " . $ftpdestinationfile . "<BR>\n";
    }
    
    // close the FTP stream
    ftp_close($conn_id);
    
    return true;
    }
    
    ftp_file( $ftp_server, $ftp_user_name, $ftp_user_pass, $source_file, $ftp_directory, $destination_file);
    
    //End FTP to Froogle
    
    
    //  End TIMER
    //  ---------
    $etimer = explode( ' ', microtime() );
    $etimer = $etimer[1] + $etimer[0];
    echo '<p style="margin:auto; text-align:center">';
    printf( "Script timer: <b>%f</b> seconds.", ($etimer-$stimer) );
    echo '</p>';
    //  ---------
    
    ?>

  7. #7
    Join Date
    Feb 2006
    Location
    Somewhere where I don't know where I am
    Posts
    2,155

    Default

    I dont think that is the file that connects to the database. Is there a config.php file or a db.php file, or a mysql.php file?
    Sign Up Now!
    Unlimited Storage, Unlimited Transfer, Host Unlimited domain names, 1 Free Domain Name
    BlueHost Features | BlueHost Help Desk | Become a BlueHost Affiliate | BlueHost CEO Blog
    (888) 401-4678 | Create a support ticket

  8. #8
    Join Date
    Mar 2006
    Posts
    121

    Default

    I see a configuration.php file in my admin section.... should I post the coding up here? Do you know what might be the problem why it's not connecting?

  9. #9
    Join Date
    Feb 2006
    Location
    Somewhere where I don't know where I am
    Posts
    2,155

    Default

    That might be it. I think is something in the coding. I wont really know until I look at it
    Sign Up Now!
    Unlimited Storage, Unlimited Transfer, Host Unlimited domain names, 1 Free Domain Name
    BlueHost Features | BlueHost Help Desk | Become a BlueHost Affiliate | BlueHost CEO Blog
    (888) 401-4678 | Create a support ticket

  10. #10
    Join Date
    Mar 2006
    Posts
    121

    Default

    try this:

    Code:
    <?php
    /*
      $Id: configuration.php,v 1.43 2003/06/29 22:50:51 hpdl Exp $
    
      osCommerce, Open Source E-Commerce Solutions
      http://www.oscommerce.com
    
      Copyright (c) 2003 osCommerce
    
      Released under the GNU General Public License
    */
    
      require('includes/application_top.php');
    
      $action = (isset($HTTP_GET_VARS['action']) ? $HTTP_GET_VARS['action'] : '');
    
      if (tep_not_null($action)) {
        switch ($action) {
          case 'save':
            $configuration_value = tep_db_prepare_input($HTTP_POST_VARS['configuration_value']);
            $cID = tep_db_prepare_input($HTTP_GET_VARS['cID']);
    
            tep_db_query("update " . TABLE_CONFIGURATION . " set configuration_value = '" . tep_db_input($configuration_value) . "', last_modified = now() where configuration_id = '" . (int)$cID . "'");
    
            tep_redirect(tep_href_link(FILENAME_CONFIGURATION, 'gID=' . $HTTP_GET_VARS['gID'] . '&cID=' . $cID));
            break;
        }
      }
    
      $gID = (isset($HTTP_GET_VARS['gID'])) ? $HTTP_GET_VARS['gID'] : 1;
    
      $cfg_group_query = tep_db_query("select configuration_group_title from " . TABLE_CONFIGURATION_GROUP . " where configuration_group_id = '" . (int)$gID . "'");
      $cfg_group = tep_db_fetch_array($cfg_group_query);
    ?>
    <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html <?php echo HTML_PARAMS; ?>>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">
    <title><?php echo TITLE; ?></title>
    <link rel="stylesheet" type="text/css" href="includes/stylesheet.css">
    <script language="javascript" src="includes/general.js"></script>
    </head>
    <body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" bgcolor="#FFFFFF" onload="SetFocus();">
    <!-- header //-->
    <?php require(DIR_WS_INCLUDES . 'header.php'); ?>
    <!-- header_eof //-->
    
    <!-- body //-->
    <table border="0" width="100%" cellspacing="2" cellpadding="2">
      <tr>
        <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="1" cellpadding="1" class="columnLeft">
    <!-- left_navigation //-->
    <?php require(DIR_WS_INCLUDES . 'column_left.php'); ?>
    <!-- left_navigation_eof //-->
        </table></td>
    <!-- body_text //-->
        <td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2">
          <tr>
            <td><table border="0" width="100%" cellspacing="0" cellpadding="0">
              <tr>
                <td class="pageHeading"><?php echo $cfg_group['configuration_group_title']; ?></td>
                <td class="pageHeading" align="right"><?php echo tep_draw_separator('pixel_trans.gif', HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>
              </tr>
            </table></td>
          </tr>
          <tr>
            <td><table border="0" width="100%" cellspacing="0" cellpadding="0">
              <tr>
                <td valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2">
                  <tr class="dataTableHeadingRow">
                    <td class="dataTableHeadingContent"><?php echo TABLE_HEADING_CONFIGURATION_TITLE; ?></td>
                    <td class="dataTableHeadingContent"><?php echo TABLE_HEADING_CONFIGURATION_VALUE; ?></td>
                    <td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_ACTION; ?>&nbsp;</td>
                  </tr>
    <?php
      $configuration_query = tep_db_query("select configuration_id, configuration_title, configuration_value, use_function from " . TABLE_CONFIGURATION . " where configuration_group_id = '" . (int)$gID . "' order by sort_order");
      while ($configuration = tep_db_fetch_array($configuration_query)) {
        if (tep_not_null($configuration['use_function'])) {
          $use_function = $configuration['use_function'];
          if (ereg('->', $use_function)) {
            $class_method = explode('->', $use_function);
            if (!is_object(${$class_method[0]})) {
              include(DIR_WS_CLASSES . $class_method[0] . '.php');
              ${$class_method[0]} = new $class_method[0]();
            }
            $cfgValue = tep_call_function($class_method[1], $configuration['configuration_value'], ${$class_method[0]});
          } else {
            $cfgValue = tep_call_function($use_function, $configuration['configuration_value']);
          }
        } else {
          $cfgValue = $configuration['configuration_value'];
        }
    
        if ((!isset($HTTP_GET_VARS['cID']) || (isset($HTTP_GET_VARS['cID']) && ($HTTP_GET_VARS['cID'] == $configuration['configuration_id']))) && !isset($cInfo) && (substr($action, 0, 3) != 'new')) {
          $cfg_extra_query = tep_db_query("select configuration_key, configuration_description, date_added, last_modified, use_function, set_function from " . TABLE_CONFIGURATION . " where configuration_id = '" . (int)$configuration['configuration_id'] . "'");
          $cfg_extra = tep_db_fetch_array($cfg_extra_query);
    
          $cInfo_array = array_merge($configuration, $cfg_extra);
          $cInfo = new objectInfo($cInfo_array);
        }
    
        if ( (isset($cInfo) && is_object($cInfo)) && ($configuration['configuration_id'] == $cInfo->configuration_id) ) {
          echo '                  <tr id="defaultSelected" class="dataTableRowSelected" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href=\'' . tep_href_link(FILENAME_CONFIGURATION, 'gID=' . $HTTP_GET_VARS['gID'] . '&cID=' . $cInfo->configuration_id . '&action=edit') . '\'">' . "\n";
        } else {
          echo '                  <tr class="dataTableRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href=\'' . tep_href_link(FILENAME_CONFIGURATION, 'gID=' . $HTTP_GET_VARS['gID'] . '&cID=' . $configuration['configuration_id']) . '\'">' . "\n";
        }
    ?>
                    <td class="dataTableContent"><?php echo $configuration['configuration_title']; ?></td>
                    <td class="dataTableContent"><?php echo htmlspecialchars($cfgValue); ?></td>
                    <td class="dataTableContent" align="right"><?php if ( (isset($cInfo) && is_object($cInfo)) && ($configuration['configuration_id'] == $cInfo->configuration_id) ) { echo tep_image(DIR_WS_IMAGES . 'icon_arrow_right.gif', ''); } else { echo '<a href="' . tep_href_link(FILENAME_CONFIGURATION, 'gID=' . $HTTP_GET_VARS['gID'] . '&cID=' . $configuration['configuration_id']) . '">' . tep_image(DIR_WS_IMAGES . 'icon_info.gif', IMAGE_ICON_INFO) . '</a>'; } ?>&nbsp;</td>
                  </tr>
    <?php
      }
    ?>
                </table></td>
    <?php
      $heading = array();
      $contents = array();
    
      switch ($action) {
        case 'edit':
          $heading[] = array('text' => '<b>' . $cInfo->configuration_title . '</b>');
    
          if ($cInfo->set_function) {
            eval('$value_field = ' . $cInfo->set_function . '"' . htmlspecialchars($cInfo->configuration_value) . '");');
          } else {
            $value_field = tep_draw_input_field('configuration_value', $cInfo->configuration_value);
          }
    
          $contents = array('form' => tep_draw_form('configuration', FILENAME_CONFIGURATION, 'gID=' . $HTTP_GET_VARS['gID'] . '&cID=' . $cInfo->configuration_id . '&action=save'));
          $contents[] = array('text' => TEXT_INFO_EDIT_INTRO);
          $contents[] = array('text' => '<br><b>' . $cInfo->configuration_title . '</b><br>' . $cInfo->configuration_description . '<br>' . $value_field);
          $contents[] = array('align' => 'center', 'text' => '<br>' . tep_image_submit('button_update.gif', IMAGE_UPDATE) . '&nbsp;<a href="' . tep_href_link(FILENAME_CONFIGURATION, 'gID=' . $HTTP_GET_VARS['gID'] . '&cID=' . $cInfo->configuration_id) . '">' . tep_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>');
          break;
        default:
          if (isset($cInfo) && is_object($cInfo)) {
            $heading[] = array('text' => '<b>' . $cInfo->configuration_title . '</b>');
    
            $contents[] = array('align' => 'center', 'text' => '<a href="' . tep_href_link(FILENAME_CONFIGURATION, 'gID=' . $HTTP_GET_VARS['gID'] . '&cID=' . $cInfo->configuration_id . '&action=edit') . '">' . tep_image_button('button_edit.gif', IMAGE_EDIT) . '</a>');
            $contents[] = array('text' => '<br>' . $cInfo->configuration_description);
            $contents[] = array('text' => '<br>' . TEXT_INFO_DATE_ADDED . ' ' . tep_date_short($cInfo->date_added));
            if (tep_not_null($cInfo->last_modified)) $contents[] = array('text' => TEXT_INFO_LAST_MODIFIED . ' ' . tep_date_short($cInfo->last_modified));
          }
          break;
      }
    
      if ( (tep_not_null($heading)) && (tep_not_null($contents)) ) {
        echo '            <td width="25%" valign="top">' . "\n";
    
        $box = new box;
        echo $box->infoBox($heading, $contents);
    
        echo '            </td>' . "\n";
      }
    ?>
              </tr>
            </table></td>
          </tr>
        </table></td>
    <!-- body_text_eof //-->
      </tr>
    </table>
    <!-- body_eof //-->
    
    <!-- footer //-->
    <?php require(DIR_WS_INCLUDES . 'footer.php'); ?>
    <!-- footer_eof //-->
    <br>
    </body>
    </html>
    <?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •