コード例 #1
0
    if (strlen($rows) < 2) {
        $rows = '0' . $rows;
    }
    ?>
              
              <tr class="dataTableRow" onMouseOver="rowOverEffect(this)" onMouseOut="rowOutEffect(this)" onClick="document.location.href='<?php 
    echo tep_href_link(FILENAME_CUSTOMERS, 'search=' . tep_customers_lname($customers['customers_id']), 'NONSSL');
    ?>
'">

                <td class="dataTableContent"><?php 
    echo $rows;
    ?>
.</td>
                <td class="dataTableContent"><?php 
    echo '<a href="' . tep_href_link(FILENAME_CUSTOMERS, 'search=' . tep_customers_lname($customers['customers_id']), 'NONSSL') . '">' . tep_customers_name($customers['customers_id']) . '</a>';
    ?>
</td>
                <td class="dataTableContent" align="center"><?php 
    echo $currencies->format(0);
    ?>
&nbsp;</td>
				 <td class="dataTableContent" align="right"><?php 
    echo tep_date_short(tep_customers_join_date($customers['customers_id']));
    ?>
&nbsp;</td>
              </tr>
<?php 
}
?>
            </table></td>
コード例 #2
0
            tep_db_query("update " . TABLE_REVIEWS . " set reviews_rating = '" . tep_db_input($reviews_rating) . "', reviews_status = '" . tep_db_input($reviews_status) . "', last_modified = now() where reviews_id = '" . (int) $reviews_id . "'");
            tep_db_query("update " . TABLE_REVIEWS_DESCRIPTION . " set reviews_text = '" . tep_db_input($reviews_text) . "' where reviews_id = '" . (int) $reviews_id . "'");
            tep_redirect(tep_href_link('reviews.php', 'page=' . $HTTP_GET_VARS['page'] . '&rID=' . $reviews_id));
            break;
        case 'deleteconfirm':
            $reviews_id = tep_db_prepare_input($HTTP_GET_VARS['rID']);
            tep_db_query("delete from " . TABLE_REVIEWS . " where reviews_id = '" . (int) $reviews_id . "'");
            tep_db_query("delete from " . TABLE_REVIEWS_DESCRIPTION . " where reviews_id = '" . (int) $reviews_id . "'");
            tep_redirect(tep_href_link('reviews.php', 'page=' . $HTTP_GET_VARS['page']));
            break;
        case 'addnew':
            $products_id = tep_db_prepare_input($HTTP_POST_VARS['products_id']);
            $customers_id = tep_db_prepare_input($HTTP_POST_VARS['customer_id']);
            $review = tep_db_prepare_input($HTTP_POST_VARS['reviews_text']);
            $rating = tep_db_prepare_input($HTTP_POST_VARS['rating']);
            tep_db_query("insert into " . TABLE_REVIEWS . " (products_id, customers_id, customers_name, reviews_rating, date_added, reviews_status) values ('" . (int) $products_id . "', '" . (int) $customers_id . "', '" . tep_customers_name($customers_id) . "', '" . (int) $rating . "', now(), 1)");
            $insert_id = tep_db_insert_id();
            tep_db_query("insert into " . TABLE_REVIEWS_DESCRIPTION . " (reviews_id, languages_id, reviews_text) values ('" . (int) $insert_id . "', '" . (int) $languages_id . "', '" . $review . "')");
            tep_redirect(tep_href_link('reviews.php', tep_get_all_get_params(array('action'))));
            break;
    }
}
require 'includes/template_top.php';
?>

    <table border="0" width="100%" cellspacing="0" cellpadding="2">
      <tr>
        <td width="100%"><table border="0" width="100%" cellspacing="0" cellpadding="0">
          <tr>
            <td class="pageHeading"><?php 
echo HEADING_TITLE;