So assuming this isn't overwhelming shot down as bad coding
1.5.5e
includes/templates/your_template/templates/tpl_product_info_display.php
...down around the details/info...
Code:
$allowedips = array('**.***.***.**', '**.***.***.**', etc.);
if(in_array($_SERVER['REMOTE_ADDR'],($allowedips))){
?>
<li><a href="https://www.your_website.com/YOUR_ADMIN/product.php?cPath=<?= $_GET['cPath']; ?>&product_type=1&pID=<?= $_GET['products_id']; ?>&action=new_product&search=<?= $_GET['products_id']; ?>" target="_top" accesskey="w">Edit Product##########____(Alt+w)</a></li>
<?php
}
I have a bunch of other work arounds including a take in/out of stock which works w/ ajax as a button.
anyone see any reasons why I shouldn't try to make my first add-on w/ some of this logic?
I was also hoping to maybe put the ip addresses in the configuration table but couldn't figure out writing the sql logic that typically comes w/ installers, and then this is also it's potentially a bad idea in that it's risky I'm guessing.
Bookmarks