Jump to content
Hugo RSF

Contribution Issue

Recommended Posts

I found something out about my problem.

 

For the homepage itself: I created a new languagefor testing, copied the files and folder from the english language and suddenly I had a homepage text! Yet still no success on the original EN language. Guess I can re-create the EN language to fix this.

 

I still don't know where the error lies.

 

Have You changed standard ID for english language?

If YES, that can be Your problem.

Have You tried to change language id in database table cell 'pages_description -> language_id' for page You have created for english version? What is happen if You do this?

Share this post


Link to post
Share on other sites

Hi

I have the same issure as GoTTi above a few months back

 

this isnt in catalog/index.php

REPLACE

if (tep_not_null(TEXT_MAIN)) {

?>

<div class="contentText">

<?php echo TEXT_MAIN; ?>

</div>

<?php

}

 

 

im running 2.3.3 with a template .... any ideas :(

 

Thanks

 

Steve

Share this post


Link to post
Share on other sites

@@sbmk1957

 

Since you are running a template, the code could be ANYTHING. So, you should post the code as it appears in your template so maybe we can help.

 

 

 

Chris


:|: Was this post helpful ? Click the LIKE THIS button :|:

 

See my Profile to learn more about add ons, templates, support plans and custom coding (click here)

Share this post


Link to post
Share on other sites

Hi Chris

 

thanks for your time and that seems to make sense ... :-

 

click me for the site

 

or index.php follows

 

<?php

/*

$Id$

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2010 osCommerce

 

Released under the GNU General Public License

*/

 

require('includes/application_top.php');

 

// the following cPath references come from application_top.php

$category_depth = 'top';

if (isset($cPath) && tep_not_null($cPath)) {

$categories_products_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_TO_CATEGORIES . " where categories_id = '" . (int)$current_category_id . "'");

$categories_products = tep_db_fetch_array($categories_products_query);

if ($categories_products['total'] > 0) {

$category_depth = 'products'; // display products

} else {

$category_parent_query = tep_db_query("select count(*) as total from " . TABLE_CATEGORIES . " where parent_id = '" . (int)$current_category_id . "'");

$category_parent = tep_db_fetch_array($category_parent_query);

if ($category_parent['total'] > 0) {

$category_depth = 'nested'; // navigate through the categories

} else {

$category_depth = 'products'; // category has no products, but display the 'no products' message

}

}

}

 

require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_DEFAULT);

?>

 

<?php

if ($category_depth == 'nested') {

$current_page = FILENAME_CATEGORIES_NESTED;

require(DIR_WS_INCLUDES . 'template_top.php');

 

include(FILENAME_CATEGORIES_NESTED);

?>

 

<?php

} elseif ($category_depth == 'products' || isset($HTTP_GET_VARS['manufacturers_id'])) {

$current_page = FILENAME_CATEGORIES_LISTING;

require(DIR_WS_INCLUDES . 'template_top.php');

 

include(FILENAME_CATEGORIES_LISTING);

?>

 

<?php

} else { // default page

$current_page = FILENAME_DEFAULT;

require(DIR_WS_INCLUDES . 'template_top.php');

 

?>

<?php if ( (NEW_PRODUCTS_MODULE_DISPLAY_FIRST_PAGE == 'true') || (NEW_PRODUCTS_MODULE_DISPLAY_FIRST_PAGE == 'true')) { ?>

<?php ?>

<?php } ?>

 

<div class="none">

<?php echo tep_draw_title_top();?>

<h1><?php echo HEADING_TITLE; ?></h1>

<?php echo tep_draw_title_bottom();?><br />

</div>

 

 

<?php

if (NEW_PRODUCTS_MODULE_DISPLAY_FIRST_PAGE == 'true') {

echo tep_draw_content_top();

include(DIR_WS_MODULES . FILENAME_NEW_PRODUCTS);

echo tep_draw_content_bottom();

}

if (FEATURED_MODUL_DISPLAY_FIRST_PAGE == 'true') {

echo tep_draw_content_top();

include(DIR_WS_MODULES . FILENAME_FEATURED);

echo tep_draw_content_bottom();

}

include(DIR_WS_MODULES . FILENAME_UPCOMING_PRODUCTS);

?>

<?php if ( (NEW_PRODUCTS_MODULE_DISPLAY_FIRST_PAGE == 'true') || (NEW_PRODUCTS_MODULE_DISPLAY_FIRST_PAGE == 'true')) { ?>

<?php ?>

<?php } ?>

 

 

<?php

}

 

require(DIR_WS_INCLUDES . 'template_bottom.php');

require(DIR_WS_INCLUDES . 'application_bottom.php');

?>

 

 

Steve

Share this post


Link to post
Share on other sites

my issue with this is my template from monster index.php is a little different. Where it says :

 

catalog/index.php

 

 

 

REPLACE

 

if (tep_not_null(TEXT_MAIN)) {

?>

 

<div class="contentText">

<?php echo TEXT_MAIN; ?>

</div>

 

<?php

}

 

WITH

 

 

I don't have the replace line.

 

This is what I have

 

 

// the following cPath references come from application_top.php

$category_depth = 'top';

if (isset($cPath) && tep_not_null($cPath)) {

$categories_products_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_TO_CATEGORIES . " where categories_id = '" . (int)$current_category_id . "'");

$categories_products = tep_db_fetch_array($categories_products_query);

if ($categories_products['total'] > 0) {

$category_depth = 'products'; // display products

} else {

$category_parent_query = tep_db_query("select count(*) as total from " . TABLE_CATEGORIES . " where parent_id = '" . (int)$current_category_id . "'");

$category_parent = tep_db_fetch_array($category_parent_query);

if ($category_parent['total'] > 0) {

$category_depth = 'nested'; // navigate through the categories

} else {

$category_depth = 'products'; // category has no products, but display the 'no products' message

}

}

}

 

require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_DEFAULT);

?>

 

<?php

if ($category_depth == 'nested') {

$current_page = FILENAME_CATEGORIES_NESTED;

require(DIR_WS_INCLUDES . 'template_top.php');

 

include(FILENAME_CATEGORIES_NESTED);

?>

 

<?php

} elseif ($category_depth == 'products' || isset($HTTP_GET_VARS['manufacturers_id'])) {

$current_page = FILENAME_CATEGORIES_LISTING;

require(DIR_WS_INCLUDES . 'template_top.php');

 

include(FILENAME_CATEGORIES_LISTING);

?>

 

<?php

} else { // default page

$current_page = FILENAME_DEFAULT;

require(DIR_WS_INCLUDES . 'template_top.php');

 

?>

<?php if ( (NEW_PRODUCTS_MODULE_DISPLAY_FIRST_PAGE == 'true') || (NEW_PRODUCTS_MODULE_DISPLAY_FIRST_PAGE == 'true')) { ?>

<?php ?>

<?php } ?>

 

<div class="none">

<?php echo tep_draw_title_top();?>

<h1><?php echo HEADING_TITLE; ?></h1>

<?php echo tep_draw_title_bottom();?><br />

</div>

 

 

<?php

if (NEW_PRODUCTS_MODULE_DISPLAY_FIRST_PAGE == 'true') {

echo tep_draw_content_top();

include(DIR_WS_MODULES . FILENAME_NEW_PRODUCTS);

echo tep_draw_content_bottom();

}

if (FEATURED_MODUL_DISPLAY_FIRST_PAGE == 'true') {

echo tep_draw_content_top();

include(DIR_WS_MODULES . FILENAME_FEATURED);

echo tep_draw_content_bottom();

}

include(DIR_WS_MODULES . FILENAME_UPCOMING_PRODUCTS);

?>

<?php if ( (NEW_PRODUCTS_MODULE_DISPLAY_FIRST_PAGE == 'true') || (NEW_PRODUCTS_MODULE_DISPLAY_FIRST_PAGE == 'true')) { ?>

<?php ?>

<?php } ?>

 

 

<?php

}

 

require(DIR_WS_INCLUDES . 'template_bottom.php');

require(DIR_WS_INCLUDES . 'application_bottom.php');

?>

 

My actual site is at

http://www.materialgirlhairsalon.com/catalog/index.php

 

I am trying to get the salon to go to salon.php...etc

 

 

echo $pagetext;

Share this post


Link to post
Share on other sites

Sorry the above should read

 

REPLACE

 

if (tep_not_null(TEXT_MAIN)) {

?>

 

<div class="contentText">

<?php echo TEXT_MAIN; ?>

</div>

 

<?php

}

 

WITH

 

echo $pagetext;

Share this post


Link to post
Share on other sites

I tried installing the latest version in oscommerce 2.3.3.4 and everything went fine until I try to install the module. It won't let me edit and there is no save button. Could somebody possibly help me out with this?

Share this post


Link to post
Share on other sites

I believe that this addon will not work with 2334 until it is recoded to proper parameters.

 

Good one @@burt you answered my question :) But is there any news on when this particular add-on will be updated to be compatible with 2.3.3.4?

 

It would be good to know.

 

Best regards


Debbie Harrison

 

Share this post


Link to post
Share on other sites

I too am having the same issue with this contribution that the link in admin/tools to the page is non-functioning. It tries to reference a file called "page_manager.php" which is non-existent. What am I missing? Generally when this error occurs it is because the file was not uploaded however there was no such file in the most current download.

Share this post


Link to post
Share on other sites

@L. Haase

 

Now have not really followed the thread but if you want a page manager for osc use this one

 

http://addons.oscommerce.com/info/1026

 

and use the version from SLiCK_303 27 May 2011

 

regards

Joli


To improve is to change; to be perfect is to change often.

 

Share this post


Link to post
Share on other sites

@L. Haase

 

I would always advise before installing any addons to have a quick read of the support thread first to check what others are saying often there are similar addons but you will find some are well supported and some are not at all

 

Regards

Joli


To improve is to change; to be perfect is to change often.

 

Share this post


Link to post
Share on other sites

@L. Haase

 

I would always advise before installing any addons to have a quick read of the support thread first to check what others are saying often there are similar addons but you will find some are well supported and some are not at all

 

Regards

Joli

 

John, you make a very good point, something in all my brilliance (yeah, right) I should have thought of myself. All kidding about my intelligence aside, it is a great idea and one that I will follow.

 

I did get this contribution installed and working perfectly. I have even made some changes, minor that they are, to change the box name to something which is appropriate for my site. As usual, it was my own error, I missed one of the filenames.php file insertions.

Share this post


Link to post
Share on other sites

I have this working perfectly and I am trying to duplicate it to an "About Us" box module. I have modified all the files from "extrainfopages" and it's variant "extra_info_pages(_manager).php" to "extraaboutus" and "extra_about_us" and modified all appropriate coding within each new file. I have also modified the insertion codes in the filenames.php and databasetables.php in both directories noted.

 

I also changed the sql to create tables called "about _us" and "about_us_description". The sql set up properly.

 

My issue seems to be within the call to the sql tables within catalog/admin/extra_about_us_pages.php (formerly extra_info_pages.php) so that I am getting the following error.

 

1054 - Unknown column 'p.pages_id' in 'on clause'

 

select count(*) as total from about_us p LEFT JOIN about_us_description s on p.pages_id = s.pages_id where s.language_id='1'

 

I think this is somewhere within the following code:

 

// Sets the status of a page

function tep_set_page_status($pages_id, $status) {

if ($status == '1') {

return tep_db_query("update " . TABLE_ABOUT_US . " set status = '1' where pages_id = '" . $pages_id . "'");

} elseif ($status == '0') {

return tep_db_query("update " . TABLE_ABOUT_US . " set status = '0' where pages_id = '" . $pages_id . "'");

} else {

return -1;

}

}

and other similar code. My question is since I changed the "extra_pages_..." reference and the table names to "about_us" and "about_us_description", is there something within this type of call I also need to change, for example the "$pages_id" to "$about_us_id" or something similar. (I actually tried this and it didnt work.)

 

My issue is I have little to no experience with sql other than being able to import/export, perform a query (add into the database) and other limited changes. I am hoping someone can point me in the right direction according to the error message or at least tell me what it means. It seems to me it is the p.pages_id in the file.

Share this post


Link to post
Share on other sites

Here is the entire file.

 

<?php

/*

$Id: extra_info_pages.php 4.50 2003/06/29 22:50:51 hpdl Exp $

 

osCommerce, Open Source E-Commerce Solutions

 

Copyright © 2003 osCommerce

 

Released under the GNU General Public License

*/

 

require('includes/application_top.php');

 

$action = (isset($_GET['action']) ? $_GET['action'] : '');

 

$languages = tep_get_languages();

 

// Sets the status of a page

function tep_set_page_status($pages_id, $status) {

if ($status == '1') {

return tep_db_query("update " . TABLE_ABOUT_US . " set status = '1' where pages_id = '" . $pages_id . "'");

} elseif ($status == '0') {

return tep_db_query("update " . TABLE_ABOUT_US . " set status = '0' where pages_id = '" . $pages_id . "'");

} else {

return -1;

}

}

 

if (tep_not_null($action)) {

switch ($action) {

case 'setflag':

if ( ($_GET['flag'] == '0') || ($_GET['flag'] == '1') ) {

tep_set_page_status($_GET['bID'], $_GET['flag']);

 

$messageStack->add_session(SUCCESS_PAGE_STATUS_UPDATED, 'success');

} else {

$messageStack->add_session(ERROR_UNKNOWN_STATUS_FLAG, 'error');

}

 

tep_redirect(tep_href_link(FILENAME_PAGE_MANAGER, 'page=' . $_GET['page'] . '&bID=' . $_GET['bID']));

break;

case 'insert':

case 'update':

if (isset($_POST['pages_id'])) $pages_id = tep_db_prepare_input($_POST['pages_id']);

$pages_title = tep_db_prepare_input($_POST['pages_title']);

$pages_html_text = tep_db_prepare_input($_POST['pages_html_text']);

$sort_order = tep_db_prepare_input($_POST['sort_order']);

 

$intorext = tep_db_prepare_input($_POST['intorext']);

 

if($intorext == 1) {

$externallink = tep_db_prepare_input($_POST['externallink']);

}else{

$externallink="";

}

$page_error = false;

 

for ($i=0, $n=sizeof($languages); $i<$n; $i++) {

 

$title_field_name=$_POST['pages_title_'.$languages[$i]['id']];

if (empty($title_field_name)) {

$messageStack->add(ERROR_PAGE_TITLE_REQUIRED, 'error');

$page_error = true;

}

}

if (empty($pages_html_text)) {

}

if ($page_error == false) {

if ($action == 'insert') {

 

if($page_type == "1" || $page_type == "2" || $page_type == "3" || $page_type == "4" || $page_type == "5" || $page_type == "6" || $page_type == "7" || $page_type == "8" || $page_type == "9") {

$selectquery=tep_db_query("select count(*) as count from ". TABLE_ABOUT_US ." where page_type=\"$page_type\"");

$exists = tep_db_fetch_array($selectquery);

 

if($exists['count'] >= 1) {

$updateall=tep_db_query("update ". TABLE_ABOUT_US ." set page_type=\"9\" where page_type=\"$page_type\"");

}

}

}

 

 

if ($action == 'update') {

 

if($page_type == "1" || $page_type == "2" || $page_type == "3" || $page_type == "4" || $page_type == "5" || $page_type == "6" || $page_type == "7" || $page_type == "8" || $page_type == "9") {

$selectquery=tep_db_query("select count(*) as count from ". TABLE_ABOUT_US ." where page_type=\"$page_type\" and pages_id != \"(int)$pages_id\"");

$exists = tep_db_fetch_array($selectquery);

 

if($exists['count'] >= 1) {

$updateall=tep_db_query("update ". TABLE_ABOUT_US ." set page_type=\"9\" where page_type=\"$page_type\"");

}

 

}

}

 

for ($i=0, $n=sizeof($languages); $i<$n; $i++) {

 

 

$pages_titlem=$_POST['pages_title_'.$languages[$i]['id']];

$pages_html_textm=$_POST['pages_html_text_'.$languages[$i]['id']];

$intorextm=$_POST['intorext_'.$languages[$i]['id']];

$externallinkm=$_POST['externallink_'.$languages[$i]['id']];

$link_targetm=$_POST['link_target_'.$languages[$i]['id']];

$language_idm='language_id_'.$languages[$i]['id'];

 

 

 

$sql_data_array_pages = array('sort_order' => $sort_order,

'status' => '1',

'page_type' => $_POST['page_type']);

 

$sql_data_array_pages_description = array('pages_title' => $pages_titlem,

'pages_html_text' => stripslashes($pages_html_textm),

'intorext' => $intorextm,

'externallink' => $externallinkm,

'link_target' => $link_targetm);

 

 

 

if ($action == 'insert') {

 

$bID="";

 

 

if ($i == 0) {

 

tep_db_perform(TABLE_ABOUT_US, $sql_data_array_pages);

 

$pages_id = tep_db_insert_id();

 

}

 

$pageid_merge= array('pages_id' => $pages_id,

'language_id' => $languages[$i]['id']);

 

$sql_data_array_pages_desc = array_merge($sql_data_array_pages_description, $pageid_merge);

 

tep_db_perform(TABLE_ABOUT_US_DESCRIPTION, $sql_data_array_pages_desc);

 

$messageStack->add_session(SUCCESS_PAGE_INSERTED, 'success');

 

 

} elseif ($action == 'update') {

 

 

if ($i == 0) {

tep_db_perform(TABLE_ABOUT_US, $sql_data_array_pages, 'update', "pages_id = '" . (int)$pages_id . "'");

}

 

 

$selectexists=tep_db_query("select count( * ) as `countrecords` from `".TABLE_ABOUT_US_DESCRIPTION."` where pages_id='" . (int)$pages_id . "' and language_id='".$languages[$i]['id']."'");

$recordexists = tep_db_fetch_array($selectexists);

 

 

 

if($recordexists['countrecords'] >= 1 ) {

tep_db_perform(TABLE_ABOUT_US_DESCRIPTION, $sql_data_array_pages_description, 'update', "pages_id = '" . (int)$pages_id . "' and language_id='".$languages[$i]['id']."'");

}

else {

 

$pageid_merge= array('pages_id' => $pages_id,

'language_id' => $languages[$i]['id']);

 

$sql_data_array_pages_desc = array_merge($sql_data_array_pages_description, $pageid_merge);

tep_db_perform(TABLE_ABOUT_US_DESCRIPTION, $sql_data_array_pages_desc);

}

 

 

$messageStack->add_session(SUCCESS_PAGE_UPDATED, 'success');

 

}

 

} //for

 

 

 

 

tep_redirect(tep_href_link(FILENAME_PAGE_MANAGER, (isset($_GET['page']) ? 'page=' . $_GET['page'] . '&' : '') . 'bID=' . $pages_id));

} else {

$action = 'new';

}

 

break;

 

 

case 'deleteconfirm':

$pages_id = tep_db_prepare_input($_GET['bID']);

 

tep_db_query("delete from " . TABLE_ABOUT_US . " where pages_id = '" . (int)$pages_id . "'");

tep_db_query("delete from " . TABLE_ABOUT_US_DESCRIPTION . " where pages_id = '" . (int)$pages_id . "'");

 

$messageStack->add_session(SUCCESS_PAGE_REMOVED, 'success');

 

tep_redirect(tep_href_link(FILENAME_PAGE_MANAGER, 'page=' . $_GET['page']));

break;

}

 

}

require(DIR_WS_INCLUDES . 'template_top.php');

?>

<script language="javascript">

function disableIt(a){

document.getElementById(a).disabled=true;

}

 

function enableIt(a){

document.getElementById(a).disabled=false;

}

</script>

<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 HEADING_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>

<?php

 

 

if ($action == 'new') {

$form_action = 'insert';

 

$parameters = array('pages_title' => '',

'pages_html_text' => '',

'sort_order' =>'',

'status' =>'');

 

$bInfo = new objectInfo($parameters);

 

if (isset($_GET['bID'])) {

$form_action = 'update';

 

$bID = tep_db_prepare_input($_GET['bID']);

 

 

 

$page_query = tep_db_query("select

s.status,

s.sort_order,

s.page_type,

p.pages_title,

p.pages_html_text,

p.intorext,

p.externallink,

p.link_target,

p.language_id

from

" . TABLE_ABOUT_US . " s left join " . TABLE_ABOUT_US_DESCRIPTION . " p on s.pages_id=p.pages_id

where

s.pages_id = '" . (int)$bID . "'");

 

while($page = tep_db_fetch_array($page_query)) {

$languageid=$page['language_id'];

$page_type=$page['page_type'];

 

$pagetitle[$languageid]= $page['pages_title'];

$sortorder=$page['sort_order'];

$pages_html_text[$languageid]=$page['pages_html_text'];

$intorext[$languageid]=$page['intorext'];

$externallink[$languageid]=$page['externallink'];

$link_target[$languageid]=$page['link_target'];

}

 

} elseif (tep_not_null($_POST)) {

$bInfo->objectInfo($_POST);

}

 

$bIDif="";

if(!empty($bID) && $bID != "") {

$bIDif='&bID='.$bID;

}

?>

<tr>

<td><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>

</tr>

<tr><?php echo tep_draw_form('new_page', FILENAME_PAGE_MANAGER, (isset($_GET['page']) ? 'page=' . $_GET['page'] . '&' : '') . 'action=' . $form_action.$bIDif, 'post', 'enctype="multipart/form-data"'); if ($form_action == 'update') echo tep_draw_hidden_field('pages_id', $bID); ?>

<td><table border="0" cellspacing="0" cellpadding="2">

 

<tr>

<td class="main"><?php echo TEXT_PAGES_TYPE; ?></td>

<td class="main"><?echo tep_draw_separator('pixel_trans.gif', '24', '15') . ' '?><select name="page_type" size=1>

<option value="1" <?php if($page_type == 1) { echo 'selected="selected"'; } ?>>1 - Index</option>

<option value="2" <?php if($page_type == 2) { echo 'selected="selected"'; } ?>>2 - Contact Us</option>

<option value="3" <?php if($page_type == 3) { echo 'selected="selected"'; } ?>>3 - Shipping</option>

<option value="4" <?php if($page_type == 4) { echo 'selected="selected"'; } ?>>4 - Privacy</option>

<option value="5" <?php if($page_type == 5) { echo 'selected="selected"'; } ?>>5 - Links</option>

<option value="6" <?php if($page_type == 6) { echo 'selected="selected"'; } ?>>6 - Content</option>

<option value="7" <?php if($page_type == 7) { echo 'selected="selected"'; } ?>>7 - Other</option>

</select></td>

</tr>

 

 

<?php

for ($i=0, $n=sizeof($languages); $i<$n; $i++) {

?>

<tr>

<td class="main"><?php if ($i == 0) echo TEXT_PAGES_TITLE; ?></td>

<td class="main">

 

<?php

echo tep_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']). ' '.tep_draw_input_field('pages_title_'.$languages[$i]['id'], $pagetitle[$languages[$i]['id']], '', true);

}

 

?>

</td>

</tr>

 

<tr>

<td class="main"><?php echo TEXT_PAGES_SORT_ORDER; ?></td>

<td class="main"><?php echo tep_draw_separator('pixel_trans.gif', '24', '15') . ' ' . tep_draw_input_field('sort_order', $sortorder, '', false); ?></td>

</tr>

 

<tr>

<td class="main"> </td>

<td class="main"> </td>

</tr>

 

<?php

for ($i=0, $n=sizeof($languages); $i<$n; $i++) {

?>

 

 

<?php if(empty($intorext[$languages[$i]['id']]) or $intorext[$languages[$i]['id']] == "0") {

$internalchecked="checked";

$externalchecked="";

$disabledlinkbox="disabled";

}

else {

$internalchecked="";

$externalchecked="checked";

$disabledlinkbox="";

}

 

?>

 

 

<tr>

<td class="main"><?php echo TEXT_PAGES_INTEXT; ?></td>

<td class="main">

<?php echo tep_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']) ?><input type="radio" value="0" name="intorext_<?php echo $languages[$i]['id']; ?>" <?php echo $internalchecked; ?> onclick='disableIt("<?php echo 'externallink_'.$languages[$i]['id']; ?>");'><?php echo TEXT_TARGET_INTERNAL; ?>

  

<?php echo tep_draw_separator('pixel_trans.gif', '24', '15'); ?><input type="radio" value="1" name="intorext_<?php echo $languages[$i]['id']; ?>" <?php echo $externalchecked;?> onclick='enableIt("<?php echo 'externallink_'.$languages[$i]['id']; ?>");'><?php echo TEXT_TARGET_EXTERNAL; ?>

</td>

</tr>

 

<tr>

<td class="main"><?php echo TEXT_PAGES_EXTERNAL_LINK; ?></td>

<td class="main"><?php echo tep_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']).' '.tep_draw_input_field('externallink_'.$languages[$i]['id'], $externallink[$languages[$i]['id']], 'id='.'"externallink_'.$languages[$i]['id'].'"'. $disabledlinkbox, false); ?></td>

</tr>

<?php if(empty($link_target[$languages[$i]['id']]) or $link_target[$languages[$i]['id']] == "0") {

$samewindowchecked="checked";

$newwindowchecked="";

}else {

$samewindowchecked="";

$newwindowchecked="checked";

}

?>

 

<tr>

<td class="main"><?php echo TEXT_TARGET; ?></td>

 

<td class="main">

 

<?php echo tep_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']);?><input type="radio" value="0" name="link_target_<?php echo $languages[$i]['id']; ?>" <?php echo $samewindowchecked; ?>><?php echo TEXT_TARGET_SAMEWINDOW; ?>

 

<input type="radio" value="1" name="link_target_<?php echo $languages[$i]['id']; ?>" <?php echo $newwindowchecked; ?>><?php echo TEXT_TARGET_NEWWINDOW; ?>

</td>

</tr>

<tr>

<td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>

</tr>

<?php

}

?>

 

<?php

for ($i=0, $n=sizeof($languages); $i<$n; $i++) {

?>

 

<tr>

<td valign="top" class="main"><br>

<td class="main"><?php echo tep_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']). ' '.tep_draw_textarea_field('pages_html_text_'.$languages[$i]['id'],'soft','50','10', $pages_html_text[$languages[$i]['id']]); ?>

</td>

</tr>

 

<?php

}

?>

<tr>

<td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>

</tr>

</table></td>

</tr>

<tr>

<td><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>

</tr>

<tr>

<td><table border="0" width="100%" cellspacing="0" cellpadding="2">

<tr>

<td class="main" align="center"><?php echo TEXT_PAGES_PAGE_NOTE . '<br>'; ?></td>

<td class="main" align="right" valign="top" nowrap><?php echo (($form_action == 'insert') ? tep_image_submit('button_insert.gif', IMAGE_INSERT) : tep_image_submit('button_update.gif', IMAGE_UPDATE)). '  <a href="' . tep_href_link(FILENAME_PAGE_MANAGER, (isset($_GET['page']) ? 'page=' . $_GET['page'] . '&' : '') . (!empty($bID) and $bID != "" ? 'bID=' . $bID : '')) . '">' . tep_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>'; ?></td>

</tr>

</table>

<input type="hidden" name="bID" value="<?php echo $bID; ?>">

</td>

</form></tr>

<?php

} else {

?>

<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" width="100%">

<td class="dataTableHeadingContent"><?php echo TABLE_HEADING_PAGES; ?></td>

<td class="dataTableHeadingContent"><?php echo TEXT_PAGES_TYPE; ?></td>

<td class="dataTableHeadingContent"><?php echo TABLE_HEADING_SORT_ORDER; ?></td>

<td class="dataTableHeadingContent" align="center"><?php echo TABLE_HEADING_STATUS; ?></td>

<td class="dataTableHeadingContent"></td>

<td class="dataTableHeadingContent"></td>

</tr>

<?php

$pages_query_raw = "select p.pages_id, p.status, p.page_type, p.sort_order, s.pages_title from " . TABLE_ABOUT_US . " p LEFT JOIN " .TABLE_ABOUT_US_DESCRIPTION . " s on p.pages_id = s.pages_id where s.language_id='" . (int)$languages_id . "' order by p.sort_order, s.pages_title";

 

$pages_split = new splitPageResults($_GET['page'], MAX_DISPLAY_SEARCH_RESULTS, $pages_query_raw, $pages_query_numrows);

$pages_query = tep_db_query($pages_query_raw);

while ($pages = tep_db_fetch_array($pages_query)) {

 

if ((!isset($_GET['bID']) || (isset($_GET['bID']) && ($_GET['bID'] == $pages['pages_id']))) && !isset($bInfo) && (substr($action, 0, 3) != 'new')) {

$bInfo_array = array_merge($pages, (array) $info);

$bInfo = new objectInfo($bInfo_array);

}

 

if (isset($bInfo) && is_object($bInfo) && ($pages['pages_id'] == $bInfo->pages_id)) {

echo ' <tr id="defaultSelected" class="dataTableRowSelected" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href=\'' . tep_href_link(FILENAME_PAGE_MANAGER, 'page=' . $_GET['page'] . '&bID=' . $pages['pages_id']) . '\'">' . "\n";

} else {

echo ' <tr class="dataTableRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href=\'' . tep_href_link(FILENAME_PAGE_MANAGER, 'page=' . $_GET['page'] . '&bID=' . $pages['pages_id']) . '\'">' . "\n";

}

?>

<td class="dataTableContent"><?php echo '<a href="javascript:popupImageWindow(\'' . FILENAME_POPUP_IMAGE . '?page=' . $pages['pages_id'] . '\')">' . tep_image(DIR_WS_IMAGES . 'icon_popup.gif', 'View Page') . '</a> ' . $pages['pages_title']; ?></td>

<td class="dataTableContent"><?php echo $pages['page_type']; ?></td>

<td class="dataTableContent"><?php echo $pages['sort_order']; ?></td>

<td class="dataTableContent" align="center">

<?php

if ($pages['status'] == '1') {

echo tep_image(DIR_WS_IMAGES . 'icon_status_green.gif', 'Active', 10, 10) . '  <a href="' . tep_href_link(FILENAME_PAGE_MANAGER, 'page=' . $_GET['page'] . '&bID=' . $pages['pages_id'] . '&action=setflag&flag=0') . '">' . tep_image(DIR_WS_IMAGES . 'icon_status_red_light.gif', 'Set Inactive', 10, 10) . '</a>';

} else {

echo '<a href="' . tep_href_link(FILENAME_PAGE_MANAGER, 'page=' . $_GET['page'] . '&bID=' . $pages['pages_id'] . '&action=setflag&flag=1') . '">' . tep_image(DIR_WS_IMAGES . 'icon_status_green_light.gif', 'Set Active', 10, 10) . '</a>  ' . tep_image(DIR_WS_IMAGES . 'icon_status_red.gif', 'Inactive', 10, 10);

}

?>

</td>

<td class="dataTableContent" align="right"></td>

<td class="dataTableContent" align="right"></td>

</tr>

<?php

}

?>

<tr>

<td colspan="5"><table border="0" width="100%" cellspacing="0" cellpadding="2">

<tr>

<td class="smallText" valign="top"><?php echo $pages_split->display_count($pages_query_numrows, MAX_DISPLAY_SEARCH_RESULTS, $_GET['page'], TEXT_DISPLAY_NUMBER_OF_PAGES); ?></td>

<td class="smallText" align="right"><?php echo $pages_split->display_links($pages_query_numrows, MAX_DISPLAY_SEARCH_RESULTS, MAX_DISPLAY_PAGE_LINKS, $_GET['page']); ?></td>

</tr>

<tr>

<td align="right" colspan="2"><?php echo '<a href="' . tep_href_link(FILENAME_PAGE_MANAGER, 'action=new') . '">' . tep_image_button('button_new_file.gif', IMAGE_NEW_PAGE) . '</a>'; ?></td>

</tr>

</table></td>

</tr>

</table></td>

<?php

$heading = array();

$contents = array();

switch ($action) {

case 'delete':

$heading[] = array('text' => '<b>' . $bInfo->pages_title . '</b>');

 

$contents = array('form' => tep_draw_form('pages', FILENAME_PAGE_MANAGER, 'page=' . $_GET['page'] . '&bID=' . $bInfo->pages_id . '&action=deleteconfirm'));

$contents[] = array('text' => TEXT_INFO_DELETE_INTRO);

$contents[] = array('text' => '<br><b>' . $bInfo->pages_title . '</b>');

if ($bInfo->pages_image) $contents[] = array('text' => '<br>' . tep_draw_checkbox_field('delete_image', 'on', true) . ' ' . TEXT_INFO_DELETE_IMAGE);

$contents[] = array('align' => 'center', 'text' => '<br>' . tep_image_submit('button_delete.gif', IMAGE_DELETE) . ' <a href="' . tep_href_link(FILENAME_PAGE_MANAGER, 'page=' . $_GET['page'] . '&bID=' . $_GET['bID']) . '">' . tep_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>');

break;

default:

if (is_object($bInfo)) {

$heading[] = array('text' => '<b>' . $bInfo->pages_title . '</b>');

 

$contents[] = array('align' => 'center', 'text' => '<br><br><a href="' . tep_href_link(FILENAME_PAGE_MANAGER, 'page=' . $_GET['page'] . '&bID=' . $bInfo->pages_id . '&action=new') . '">' . tep_image_button('button_edit.gif', IMAGE_EDIT) . '</a> <a href="' . tep_href_link(FILENAME_PAGE_MANAGER, 'page=' . $_GET['page'] . '&bID=' . $bInfo->pages_id . '&action=delete') . '">' . tep_image_button('button_delete.gif', IMAGE_DELETE) . '</a><br><br><br>');

 

if ($bInfo->date_scheduled) $contents[] = array('text' => '<br>' . sprintf(TEXT_PAGES_SCHEDULED_AT_DATE, tep_date_short($bInfo->date_scheduled)));

 

if ($bInfo->expires_date) {

$contents[] = array('text' => '<br>' . sprintf(TEXT_PAGES_EXPIRES_AT_DATE, tep_date_short($bInfo->expires_date)));

} elseif ($bInfo->expires_impressions) {

$contents[] = array('text' => '<br>' . sprintf(TEXT_PAGES_EXPIRES_AT_IMPRESSIONS, $bInfo->expires_impressions));

}

 

if ($bInfo->date_status_change) $contents[] = array('text' => '<br>' . sprintf(TEXT_PAGES_STATUS_CHANGE, tep_date_short($bInfo->date_status_change)));

}

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>

<?php

}

?>

</table>

<?php

require(DIR_WS_INCLUDES . 'template_bottom.php');

require(DIR_WS_INCLUDES . 'application_bottom.php');

?>

 

I think the issue is somewhere in the call to the DB tables and columns.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×