コード例 #1
0
function qtpro_sick_product_count()
{
    $count_ret = 0;
    $prod_query = tep_db_query("SELECT products_id FROM " . TABLE_PRODUCTS);
    while ($product = tep_db_fetch_array($prod_query)) {
        if (!qtpro_doctor_product_healthy($product['products_id'])) {
            $count_ret++;
        }
    }
    return $count_ret;
}
コード例 #2
0
ファイル: qtprodoctor.php プロジェクト: digideskio/oscmax2
<!-- left_navigation //-->
<?php 
require DIR_WS_INCLUDES . 'column_left.php';
?>
<!-- left_navigation_eof //-->
      </table>
    </td>
<!-- body_text //-->
    <td width="75%" valign="top">
    <table border="0" width="100%" cellspacing="0" cellpadding="2">
      <tr>
        <td>
		<?php 
switch ($doctor_action) {
    case 'examine':
        if (qtpro_doctor_product_healthy($products_id)) {
            print '<span style="font-family: Verdana, Arial, sans-serif; font-size: 10px; color: green; font-weight: normal; text-decoration: none;"><b>Product is healthy</b><br /> The database entries for this products stock as they should.</span>';
        } else {
            print '<span style="font-family: Verdana, Arial, sans-serif; font-size: 10px; color: red; font-weight: normal; text-decoration: none;"><b>Product is sick</b><br /> The database entries for this products stock is messed up. This is why the table above looks messed up.</span>';
        }
        break;
    case 'amputate':
        print '<p class="messageStackWarning">' . tep_image(DIR_WS_ICONS . 'database_error.png', '', '') . '&nbsp;&nbsp;' . qtpro_doctor_amputate_bad_from_product($products_id) . ' database entries were amputated</p>';
        qtpro_update_summary_stock($products_id);
        break;
    case 'chuck_trash':
        print '<p class="messageStackWarning">' . tep_image(DIR_WS_ICONS . 'database_error.png') . '&nbsp;&nbsp;' . qtpro_chuck_trash() . ' database entries were identified as trash and deleted.</p>';
        break;
    case 'update_summary':
        qtpro_update_summary_stock($products_id);
        print '<p class="messageStackSuccess">' . tep_image(DIR_WS_ICONS . 'tick.png') . '&nbsp;&nbsp;The summary stock for the product was updated.</p>';