Using "or" in a log in script

I have a small family website that is for members only. I have a login script that matches a list of names and password and I protect every page with
This works very well, however.. I am now trying to develop a family tree where I would like to include non members yet still be protected from the general puplic.
Could I (is there) a way to use an "or" statement in my login routine something along the line of "require ../login.php or ../fam_tree.php" If.. that were possible I would make a new login page for "non-members", they could see the family tree page(s) but be blocked from the rest of the site and members would see the family tree page(s) with no difference to the rest of the site pages.
Thanks for your time.
Any thoughts or advice welcomed.
Ralph

I don't do PHP so I can't give you any specific code to accomplish what you want, but the concepts are the same in all programming languages.
I would suggest adding another dimension to your array  - a boolean variable to store whether the user is a member or not.
$authorization[] = array('username', 'userpassword', 'member');
When they log in you retrieve the value in 'member' and store in another session variable. So in effect, you will have 2 session variables; one that says the user is logged in and another that says they are a member (or not). Add a variable to your pages that identify the page as either restricted to regular users or to members. Modify your existing php code to check the value of that variable. If it is set for members only, then only allow users with session variable 'member' set to true.

Similar Messages

  • Should I use the built in log rolling function on iWS 6 or roll my own using a cron job using stop and start scripts in the web server instance root?

     

    Hi,
    You can use either OS cron job based log rotation
    OR
    Internal daemon log rotation.
    It is recommeded to use OS cron job log rotation.
    OS=Operating System
    Regards,
    Dakshin.
    Developer Technical Support
    Sun Microsystems
    http://www.sun.com/developers/support.

  • Thinking about using the Windows Event Logs as my main log store - looking for pros and cons

    I have been writing some larger scripts that write to physical log files.  Until today I have avoided trying to use the Windows Event logs, but, am beginning to rethink this and wondered if anyone has done this, and, what the strengths and weaknesses
    of this logging approach has been.  If I do it, I will probably write a function that accepts pipelined input and simply pass output to the log.  I wanted to get a feel for what I would be getting into before I started writing things up since this
    will probably take a little bit of work to get set up to run properly.

    At my company we use the Windows event log for many of our batch process logging for several reasons:
    Unlike logging to a central database, the Windows event log is always available. I've seen poorly thought out logging solution which log to a database and if the database happens to be unavailable the batch process would fail.
    Monitoring tool such as SCOM already have Windows event log watchers so adding alerts to take action based on message written to the Windows event log is easy
    Built-in support for writing Windows event log entries in the Powershell V2 write-eventlog cmdlet, a simple CLR can created in SQL Server or even command-line eventcreate.exe
    Easy to create a custom event log so you don't have to use the default application log in Windows 2008 and higher.
    Most shrink-wrap S/W already use the event log
    Issues I've seen:
    Windows 2008 with UAC on requires "registering" i.e. creating a new event log source with UAC. This can be done one time manually. Unfortunately there isn't a way to automate UAC--pure GUI. The Powershell command would be "New-EventLog -LogName Application
    -Source  mysource" if you're using the Application log and must be run as  administrator.
    Errant process writes many entries to the event log. Depending on the volume like for example writing stack dumps this can performance problems. I  think I recall an issue an Windows 2003 or Windows 2008 with UAC off  if you're creating a new
    event log source each time (which you shouldn't) then these results in many registry entries which can cause problems.
    I don't think the issues outweigh the benefits--just something to be aware of.

  • How to use a boolean to log time?

    Hi all,
    In my application, I want to use a boolean to log a time on continuous bases. When boolean gets 1, it logs system time. When boolean gets 0, it logs system time...& the cycle goes on.. We can use push button for changing boolean value...
    Please guide me,,
    Thank you,
    Vaibhav Gandhi
    B.E. Instrumentation & Control,
    INDIA
    Solved!
    Go to Solution.

    Hi vaibhav,
     I created a switch control,whenver its state is changed..that particular time is logged...Check the attachment..
    Thanks and regards,
    srikrishnaNF
    Attachments:
    Example_VI_BD.png ‏12 KB

  • How to SIMPLY use the %DIMENSION_TO_SET% variables into logic scripts

    hello,
    I'm using a prompt of type "COPYMOVE" or "COPYMOVEINPUT". In this type of prompt, there are 2 columns of dimension members list, one for defining the "source zone" and one for defining the "target zone" of logics.
    The left colum of the prompt (for source zone) feeds the variables %DIMENSION_SET% : %ACCOUNT_SET%, %ENTITY_SET%, %CATEGORY_SET%, etc...and these variables can be used in the logic scripts in *XDIM_MEMBERSET instructions for example.
    The right colum of the prompt feeds the variables %DIMENSION_TO_SET% : %ACCOUNT_TO_SET%, %ENTITY_TO_SET%, %CATEGORY_TO_SET%, etc...and I don't know how to SIMPLY use these variables in the logic scripts.
    I've found a tricky way to do that but I meet 2 problems :
    - it is complicated
    - the multi-info instruction (BEGININFO/ENDINFO) seems to be bugged as blank lines are added all the time in the code and sometimes I have to wait for minutes when I try to modifiy the package code through BPC for excel eData/modify package menu.
    So the question is how to SIMPLY get the %DIMENSION_TO_SET% variables into logic scripts and use them ? Thanks, R.
    Here is the tricky package code I use at this time (I build one function for each %DIMENSION_TO_SET% variable and I pass these functions to the logic) :
    PROMPT(COPYMOVE,,,,"ACCDETAIL,ACCOUNT,CATEGORY,DATASRC,ENTITY,TIME,YEARS")
    TASK(Execute formulas,USER,WS-WW\PlauchuR)
    TASK(Execute formulas,APPSET,US)
    TASK(Execute formulas,APP,SV)
    TASK(Execute formulas,SELECTION,D:\BPC\Data\WebFolders\US\SV\PrivatePublications\PlauchuR\TempFiles\FROM_1561_.TMP)
    TASK(Execute formulas,TOSELECTION,D:\BPC\Data\WebFolders\US\SV\PrivatePublications\PlauchuR\TempFiles\TO_1561_.TMP)
    BEGININFO(%FSS%)
    *FUNCTION TARGETACCDETAIL=%ACCDETAIL_TO_SET%
    *FUNCTION TARGETACCOUNT=%ACCOUNT_TO_SET%
    *FUNCTION TARGETCATEGORY=%CATEGORY_TO_SET%
    *FUNCTION TARGETDATASRC=%DATASRC_TO_SET%
    *FUNCTION TARGETENTITY=%ENTITY_TO_SET%
    *FUNCTION TARGETTIME=%TIME_TO_SET%
    *FUNCTION TARGETYEARS=%YEARS_TO_SET%
    ENDINFO
    TASK(Execute formulas,FORMULASCRIPT,%FSS%)
    TASK(Execute formulas,LOGICFILE,D:\BPC\Data\WebFolders\US\SV
    ..\AdminApp\SV\_TEST.Lgf)
    TASK(Execute formulas,RUNMODE,1)
    TASK(Execute formulas,LOGICMODE,1)
    Edited by: ALEXANDRE BEDIER on Jun 16, 2010 3:15 PM

    hello,
    finally I've discovered that there is no need of BEGININFO instruction.
    One can pass several functions to a logic with one FORMULASCRIPT task. The functions definitions have to be separated by instructions. See below :
    PROMPT(COPYMOVEINPUT,%FTARGETS%,,"select source and target zone for category and datasource.","ACCDETAIL,ACCOUNT,CATEGORY,DATASRC,ENTITY,TIME,YEARS")
    TASK(Execute formulas,FORMULASCRIPT,*FUNCTION TACCDETAIL=%ACCDETAIL_TO_SET% *FUNCTION TACCOUNT=%ACCOUNT_TO_SET% *FUNCTION TCATEGORY=%CATEGORY_TO_SET% *FUNCTION TDATASRC=%DATASRC_TO_SET% *FUNCTION TENTITY=%ENTITY_TO_SET% *FUNCTION TTIME=%TIME_TO_SET% *FUNCTION TYEARS=%YEARS_TO_SET%)
    TASK(Execute formulas,USER,%USER%)
    TASK(Execute formulas,APPSET,%APPSET%)
    TASK(Execute formulas,APP,%APP%)
    TASK(Execute formulas,SELECTION,%SELECTIONFILE%)
    TASK(Execute formulas,LOGICFILE,%APPPATH%\..\AdminApp\%APP%\_TEST.LGF)
    TASK(Execute formulas,RUNMODE,1)
    TASK(Execute formulas,LOGICMODE,1)
    Then one will be able to use the functions TACCDETAIL, TCATEGORY, TACCOUNT,... in the logic script.
    Edited by: ALEXANDRE BEDIER on Jun 24, 2010 10:31 AM
    Edited by: ALEXANDRE BEDIER on Jun 24, 2010 10:33 AM

  • HT2688 My daughter has used my computer to log into iTunes and download music but now it won't let me download recently purchased music from my iPad onto my computer. I want to transfer the recently purchased songs onto my iPod so how can I do this now.

    My daughter has used my computer to log into iTunes and download music but now it won't let me download recently purchased music from my iPad onto my computer. I want to transfer the recently purchased songs onto my iPod so how can I do this now? iTunes now says that I have to wait another 55 days! There must be a way to do this since I have paid for them.

    In iTunes sign out of your daughters Apple ID and sign in with your own.

  • TS2529 Im am using Windows 7 ,I log onto to itunes and connect my Iphone.When my iphone tries to sync it gives an error message "itunes has stopped working" - this only happens when i connect my iphone and it tries to sync - help please

    Im am using Windows 7 ,I log onto to itunes and connect my Iphone.When my iphone tries to sync it gives an error message "itunes has stopped working" - this only happens when i connect my iphone and it tries to sync - help please

    Many thanks.
    With those symptoms, I'd try the following document:
    Apple software on Windows: May see performance issues and blank iTunes Store
    (If there's a SpeedBit LSP showing up in Autoruns, it's usually best to just uninstall your SpeedBit Video Accelerator.)

  • How to use bind vars in SQL*Plus Script?

    I am trying to use a bind var in my script ... does not seem to work ... something along these lines.
    variable v_id number;
    select max(user_id) into :v_id
    from user_id_tbl;
    exec trace_user(:v_id);
    This is in a UNIX Script - I don't get any errors but the binding is not working - not passing a valid v_id ... Any ideas?

    For the record a solution is:
    variable v_id number;
    begin
    select max(user_id) into :v_id from user_id_tbl;
    end;
    exec trace_user(:v_id);
    -- CJ

  • I am using Pages 09 to write a script/storyboard. I'm adapting the screenplay template but would like to drop in framed 19.2 x 10.8 masks to drop visuals into while maintaining the screen format. Would really appreciate a pointer.

    I am using Pages 09 to write a script/storyboard. I'm adapting the standard screenplay template but would like to drop in framed 19.2 x 10.8 masks (ideally with a black stroke round them) to drop visuals into. In a perfect world I'd be able to save them as a style or a custom shape, but I can't find any suggestions in help or forums. I would really appreciate some pointers. Here's a screenshot of the (small) progress so far :
         Thanks in advance for looking at this - I really did spend time going through the help pages etc.

    Try this app: http://tyorex.com/iWorkConverter
    Batch convert Pages files to doc and pdf.

  • Regarding how to use the function module *control_form* in scripts

    HI friends,
    Can any one tell why and where do we use the function module control_form in scripts. Can you give me a small scenario how to use in scripts.

    hi satish,
    by using this function module we can pass the control
    commands to FORM THROUGH ABAP/4 PROGRAM.
    see the following example:
    TABLES: kna1.
    DATA: BEGIN OF it_kna1 OCCURS 0,
          kunnr LIKE kna1-kunnr,
          name1 LIKE kna1-name1,
          ort01 LIKE kna1-ort01,
          land1 LIKE kna1-land1,
          END OF it_kna1.
    DATA:records TYPE i,
         window TYPE i value 1.
    select-options:s_kunnr for kna1-kunnr.
    SELECT kunnr name1 ort01 land1 FROM kna1 INTO TABLE it_kna1
    where kunnr in s_kunnr.
    CALL FUNCTION 'OPEN_FORM'
      EXPORTING
        form     = 'ZSCRIPT4'
        language = sy-langu.
    LOOP AT it_kna1.
      CALL FUNCTION 'WRITE_FORM'
        EXPORTING
          element  = 'ELE1'
          function = 'SET'
          type     = 'BODY'
          window   = 'MAIN'.
      DESCRIBE TABLE it_kna1 LINES records.
      IF window lt records.
        window = window + 1.
      CALL FUNCTION 'CONTROL_FORM'
       EXPORTING
            command         = 'NEW-WINDOW'
    EXCEPTIONS
      UNOPENED        = 1
    UNSTARTED       = 2
    OTHERS          = 3
      ENDIF.
    ENDLOOP.
    CALL FUNCTION 'CLOSE_FORM'
    IMPORTING
      RESULT                         =
      RDI_RESULT                     =
    TABLES
      OTFDATA                        =
    EXCEPTIONS
      UNOPENED                       = 1
      BAD_PAGEFORMAT_FOR_PRINT       = 2
      SEND_ERROR                     = 3
      SPOOL_ERROR                    = 4
      CODEPAGE                       = 5
      OTHERS                         = 6
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    thanks,
    raji

  • Asynch Hot Log mode does not use hot (online) redo logs

    Version 10.2
    We have just set up a test of the Asynch Hot Log replication according to Chap 16 of the Data Warehousing guide.
    We can see data put into the change table. However, it seems that data gets written to the change table ONLY after a log switch. This would suggest that the capture process is not reading the online logs, but is only reading the archived logs.
    I don't think this can be correct behavior because the docs indicate that Oracle "seamlessly switches" between the online and the archived redo logs.
    Is there a flag or something to set to cause the online logs to be available to the capture process? Or is this a bug? Has anyone else observed this behavior?
    Thanks for any insight.
    -- Chris Curzon

    According to the 10g Dataguard docs, section 2.5.1:
    "Physical standby databases do not use an online redo log, because physical standby databases are not opened for read/write I/O."yes, those are used when database is open.
    You should not perform any changes in Standby. Even if those exist online redo log files, whats the difficulty you have seen?
    These will be used whenever you performed switchover/failover. So nothing to worry on this.
    Is this a case of the STANDBY needing at least a notion of where the REDO logs will need to be should a failover occur, and if the files are already there, the standby database CONTROLFILE will hold onto them, as they are not doing any harm anyway?Then oracle functionality itself harm if you think in that way. When they not used in open then what the harm with that?
    Standby_File_management --> for example if you add any datafile, those information will be in archives/redos once they applied on standby those will be added automatically when it is set to AUTO if its manual, then it creates a unnamed file in $ORACLE_HOME/dbs location later you have to rename that file and recovery need to perform .
    check this http://docs.oracle.com/cd/B14117_01/server.101/b10755/initparams206.htm
    HTH.

  • Can I use the same import log for two imp par?

    Hi, Buddy:
    I have a question:
    From the same dmp file, I want to run import simultaneously using two imp par files, can I just using only one(same) log file for those two imp work?
    thank you very much!
    Jerry

    Hi,
    two par file are like followings:
    par 1
    fromuser=A
    touser=A
    par 2
    tables=(B.table1,B.table2......)
    the purpose is the imp schema A totally, and imp schema B's selected tables.

  • What are F. M's used for creating application log in application server

    Hello
    plz suggest which F.M's i have to use to create application log
    Regards
    Kanth

    Hi Kanth,
    You can go through the following Function Modules :
    Application Log Maintenance
    (i)APPL_LOG_DELETE With this function module you delete logs in the database according to specified selection conditions
    (ii)APPL_LOG_DISPLAY With this function module you can analyze logs in the database.
    (iii)APPL_LOG_DISPLAY_INTERN With this function module you can analyze logs in local memory, e.g. when you have only collected log records at runtime and do not want to write to the database.
    (iv)APPL_LOG_INIT This function module checks whether the specified object or sub-object exists and deletes all existing associated data in local memory.
    (v)APPL_LOG_READ_DB With this function module you read the log data in the database for an object or sub-object according to specified selection conditions.
    (vi)APPL_LOG_READ_INTERN With this function module you read all log data whose log class has at least the specified value, from local memory, for the specified object or sub-object.
    (vii)APPL_LOG_SET_OBJECT With this function module, you create a new object or sub-object for writing in local memory. With a flag you can control whether the
    (viii)APPL_LOG_WRITE_u2026 messages are written in local memory or are output on the screen.
    (ix)APPL_LOG_WRITE_DB With this function module you write all data for the specified object or sub-object in local memory to the database. If the log for the object or sub-object in question is new, the log number is returned to the calling program.
    (x)APPL_LOG_WRITE_HEADER With this function module, you write the log header data in local memory.
    (xi)APPL_LOG_WRITE_LOG_PARAMETERS With this function module, you write the name of the log parameters and the associated values for the specified object or sub-object in local memory. If this function module is called repeatedly for the same object or sub-object, the existing parameters are updated accordingly. If you do not specify an object or sub-object with the call, the most recently used is assumed.
    (xii)APPL_LOG_WRITE_MESSAGE_PARAMS With this function module you write a single message, with parameters, in local memory. Otherwise the function module works like
    (xiv)APPL_LOG_WRITE_SINGLE_MESSAGE.
    (xv)APPL_LOG_WRITE_MESSAGES With this function module you write one or more messages, without parameters, in local memory.
    (xvi)APPL_LOG_WRITE_SINGLE_MESSAGE With this function module you write a single message, without parameters, in local memory. If no header entry has yet been written for the object or sub-object, it is created. If you do not specify an object or sub-object with the call, the most recently used is assumed.
    Regards,
    Swapna.

  • Use environment variables in logging.properties file

    is there a way to use environment variables in logging.properties file?
    like this -
    java.util.logging.FileHandler.pattern = {$MY_BASE_LOG_FOLDER}/myapp1/log/123%g.logdo I have to write a custom logging.properties loader? if yes, then are there any examples on this?

    I'm sorry, but don't you think your answer is useless?
    Maybe I haven't made my question clear enough. I need to know if java.util.logging recognizes environment variables in logging.properties files.
    If it does not, then there should be a well-known class to use instead of standard loader for logging.properties (java api mention one briefly).

  • Using the java.util.logging in JDK1.3

    I would like to use the java.util.logging classes of JDK1.4 in JDK1.3. So I tried creating a new jar with only the java.util.logging package, however, javac generates the error:
    >>>>>>
    bad class file: E:\ThinClient\Log\logging.jar(java/util/logging/Logger.class)
    class file has wrong version 48.0, should be 47.0
    Please remove or make sure it appears in the correct subdirectory of the classpath.
    <<<<<<<
    I tried placing the jar both in classpath and bootclasspath during javac and still was not successful, is there any way of getting around this, other than re-implementing this or getting some third parties implementation such as Apache's log4j?

    check out Lumberjack in sourceForge

Maybe you are looking for

  • FIX: Change your Billing Cycle and Due Date!

    There are many people angry about the change in billing due dates that have been set by AT&T recently.  There is a way to get your due date back to where you want it but does require a little work on your part. NOTE: I am not an AT&T Employee, this i

  • Update Acrobat X Pro to 10.1.11. After update, Acrobat does not open. Acrobat is licensed. Ran repair, no help

    Did a regular update of Acrobat, from within the application. Update completed normally. After update, Acrobat does not open. No error or any message. Tried repairing, same.

  • Enhancement to  CJIC

    We have the requirement to enhance CJIC as below.. Appreciate any help.. 1.     Add project definition field on selection screen 2.     Add multiple selection functionality on existing WBS element field on selection screen 3.     Enable WBS upload fr

  • Delivering applications for Solaris 2.5.1 using Forte C 6

    Is it possible, using Forte C 6 as the development environment, on Solaris 7, to produce applications that will successfully run on Solaris 2.5.1 ? Any help will be appreciated. Thanks. Yves.

  • Inbound EDI/Idoc to change PO

    Hello Dear Sappers, I'm using message type ORDRSP (Idoc ORDERS05) for inbound Vendor confirmation, and it works. Our Vendors also send price changes, quantity changes, material changes and cancellation to PO item. Can i use ORDRSP to update my PO ite