Results 1 to 10 of 11

Threaded View

  1. #1
    Join Date
    Dec 2008
    Location
    Pittsburgh, PA
    Posts
    237
    Plugin Contributions
    1

    Default Front end>admin edit--Possibly IP address spoofing concern, but man I like this...

    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.
    Last edited by wolfderby; 5 Jan 2018 at 12:14 AM.

 

 

Similar Threads

  1. v139h Product showing on front end, but can't find on back?
    By cyphered in forum Setting Up Categories, Products, Attributes
    Replies: 3
    Last Post: 5 Oct 2012, 06:33 PM
  2. Imported products missing from admin, but present for orders and front-end display
    By AustinThemes in forum Setting Up Categories, Products, Attributes
    Replies: 1
    Last Post: 20 Feb 2011, 09:48 AM
  3. Categories not showing up in front end but it is added in back end
    By raaj.smvec in forum Setting Up Categories, Products, Attributes
    Replies: 0
    Last Post: 22 Apr 2010, 12:06 PM
  4. Migrated, now the admin works but not the front end
    By asimms1 in forum General Questions
    Replies: 4
    Last Post: 8 Apr 2009, 04:25 PM
  5. There is a watermark of a man on the front end...how do I remove?
    By tanyaleann in forum Templates, Stylesheets, Page Layout
    Replies: 5
    Last Post: 13 Oct 2008, 07:22 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR