function alert_messages($store_id) { $today = date('Y-m-d', strtotime("now")); $yesterday = date('Y-m-d', strtotime("-1 day")); $result = array(); $html = ''; if (count($result) > 0) { $html .= '<div class="section clearfix">'; $html .= '<h4>Today</h4>'; foreach ($result as $row) { $html .= '<div class="content_alert">You have <strong>' . $row->count . ' new violation</strong></div>'; $html .= '<div class="action_alert"><a href="javascript:void(0);"><img src="' . frontImageUrl() . 'close.png" alt="Close" title="Close" onclick="delete_alerts(\'' . $store_id . '\', \'' . $row->datetime_tracked . '\');" /></a></div>'; $html .= '<div class="clear"></div>'; } $html .= '</div>'; } else { $html .= '<div class="section clearfix">'; $html .= '<h4>Today</h4>'; $html .= "0 Alerts"; $html .= '</div>'; } $result = array(); if (count($result) > 0) { $html .= '<div class="section clearfix">'; $html .= '<h4>' . date('F j, Y', strtotime("-1 day")) . '</h4>'; foreach ($result as $row) { $html .= '<div class="content_alert">You have <strong>' . $row->count . ' new violation</strong></div>'; $html .= '<div class="action_alert"><a href="javascript:void(0);"><img src="' . frontImageUrl() . 'close.png" alt="Close" title="Close" onclick="delete_alerts(\'' . $store_id . '\', \'' . $row->datetime_tracked . '\');" /></a></div>'; $html .= '<div class="clear"></div>'; } $html .= '</div>'; } else { $html .= '<div class="section clearfix">'; $html .= '<h4>' . date('F j, Y', strtotime("-1 day")) . '</h4>'; $html .= "0 Alerts"; $html .= '</div>'; } $bad_upc = $store_id ? getBadUPCs($store_id) : array(); $html .= '<div class="section clearfix">'; $html .= '<h4>Today</h4>'; $html .= '<a href="' . base_url() . 'catalog">' . count($bad_upc) . " Bad UPC's</a>"; $html .= '</div>'; return $html; }
<?php $violation = '<img src="' . frontImageUrl() . 'icons/arrow-orange-down.png" alt="MAP Violation"> LOW'; // for non-violation reports we - don't really have the shot value from the violations table $shot = get_violation_image($violations[$i]); if (!empty($shot)) { $violation = '<a href="' . $shot . '" target="_blank">' . $violation . '</a>'; } echo $violation; ?> </td> <td> <a href="<?php echo $violations[$i]['url']; ?> " target="_blank"><img src="<?php echo frontImageUrl(); ?> icons/link.png"></a> </td> </tr> <?php } ?> </tbody> </table> <script type="text/javascript"> $(document).ready(function() { var table = $('#price-violators-table').DataTable({
if ($violations[$i]['map'] > $violations[$i]['price']) { ?> $<?php echo number_format($violations[$i]['map'] - $violations[$i]['price'], 2); ?> <?php } else { ?> OK <?php } ?> </td> <td> <?php $violation = '<img src="' . frontImageUrl() . 'icons/arrow-orange-down.png" alt="MAP Violation"> LOW'; //for non-violation reports we - don't really have the shot value from the violations table $shot = get_violation_image($violations[$i]); if (!empty($shot)) { $violation = '<a href="' . $shot . '" target="_blank">' . $violation . '</a>'; } echo $violation; ?> </td> <td><a href="<?php echo $violations[$i]['url']; ?> " target="_blank"><?php echo extractDomainByURL($violations[$i]['url']); ?> </a></td>
$<?php echo number_format($comparison['map'], 2); } } ?> </td> <td <?php echo $style; ?> > <?php if ($comparison) { //until we start keeping correct map values in dynamo - just grab from google data $map = $comparison['map']; if ($comparison['price'] < $map) { $violation = '<img src="' . frontImageUrl() . 'floor.png" alt="" style="margin-right:5px;"> LOW'; //for non-violation reports we - don't really have the shot value from the violations table $shot = get_violation_image($comparison); if (!empty($shot)) { $violation = '<a href="' . $shot . '" target="_blank">' . $violation . '</a>'; } echo $violation; } } ?> </td> <td <?php echo $style; ?> ><?php if ($comparison) {
<td <?php echo $style; ?> >$<?php echo number_format($productData[$i]['price'], 2); ?> </td> <td <?php echo $style; ?> > <?php //until we start keeping correct map values in dynamo - just grab from google data $map = $productData[$i]['map']; if ($productData[$i]['price'] < $map) { $violation = '<img src="' . frontImageUrl() . 'icons/arrow-orange-down.png" alt="" style="margin-right:5px;"> LOW'; //for non-violation reports we - don't really have the shot value from the violations table $shot = get_violation_image($productData[$i]); if (!empty($shot)) { $violation = '<a href="' . $shot . '" target="_blank">' . $violation . '</a>'; } echo $violation; } ?> </td> <td <?php echo $style; ?> ><a href="<?php echo $productData[$i]['url']; ?>
protected function get_info_image($merchant_name_id, $count = 0) { /*if ( $count == 0 ) { return img(array( 'src' => frontImageUrl() . 'icons/16/2.png', 'class' => 'catalogCheck', 'alt' => "New write comment", 'title' => "New write comment" )); }*/ $img = img(array('src' => frontImageUrl() . 'icons/16/2.png', 'class' => 'catalogCheck')); return '<a link="' . site_url("enforcement/notes_preview/" . $merchant_name_id) . '" class="ajaxtooltip">' . $img . '</a>'; }
function check_enable($uri, $value, $id, $act = 0) { if ($value == 0) { if ($act == 0) { return '<a href="javascript:void(0);" class="clickTip exampleTip" title="This is turned off, click to turn on." onclick="javascript:enable_it(' . $id . ', \'0\', \'' . $uri . '\');"><img src="' . frontImageUrl() . 'ico_red.png" width="17" height="17" /></a>'; } else { return '<a href="javascript:void(0);" class="clickTip exampleTip" title="This is turned off, click to turn on." onclick="javascript:enable_it(' . $id . ', \'1\', \'' . $uri . '\');"><img src="' . frontImageUrl() . 'ico_red.png" width="17" height="17" /></a>'; } } else { if ($act == 0) { return '<a href="javascript:void(0);" class="clickTip exampleTip" title="This is now on, click to turn off." onclick="javascript:disable_it(' . $id . ', \'0\', \'' . $uri . '\');"><img src="' . frontImageUrl() . 'ico_green.png" width="17" height="17" /></a>'; } else { return '<a href="javascript:void(0);" class="clickTip exampleTip" title="This is now on, click to turn off." onclick="javascript:disable_it(' . $id . ', \'1\', \'' . $uri . '\');"><img src="' . frontImageUrl() . 'ico_green.png" width="17" height="17" /></a>'; } } }
<?php $tableHeadStyle = 'style="background:#E7E7E8;color:#000;"'; $tableCellStyle = 'style="border:1px solid #E7E6E5;height:20px;padding:2px 0 0 10px;text-align:left;"'; $solidLineStyle = 'style="background-color:#FBB925;height:1px;line-height:1px;overflow:hidden;"'; $h2Style = 'font-size:12px;width:580px;margin:12px 0 0 0'; ?> <body> <div style="color:#666;font-family:Arial,Helvetica,sans-serif;min-height:400px;"> <table border="0" cellpadding="0" cellspacing="0" width="580"> <tr> <td width="515" align="left"> <img src="<?php echo frontImageUrl() . 'nav/sticky-vision.png'; ?> " alt="Logo" /> <?php if (isset($merchant_logo) && !empty($merchant_logo)) { ?> <img src="<?php echo $merchant_logo; ?> " alt="<?php echo $brand_name; ?> " /><?php } ?> </td> <td width="65" align="right"> <span style="font-size:23px;font-family:'Times New Roman', Times, serif;color:#6a696e;">REPORTING</span><br />
/** * Get the products of a group and return as JSON * * @param int $group_id */ public function get_group_products($group_id) { $this->_response_type('json'); // check that the user is the owner of the group $groupStore = $this->Product->getGroupStore($group_id); $this->data->data = $groupStore == $this->store_id ? $this->Product->getProductsByGroupId($group_id, TRUE) : array(); if (!empty($this->data->data)) { for ($i = 0, $n = count($this->data->data); $i < $n; $i++) { $product =& $this->data->data[$i]; $product['label'] = '<span class="productName">' . $product['title'] . '</span>' . '<img class="deleteGroupProduct imgIcon" src="' . frontImageUrl() . 'icons/16/69.png' . '" />'; } } }