phpBMS

Show
Ignore:
Timestamp:
01/07/10 18:13:51 (2 years ago)
Author:
brieb
Message:
  • more sucrity tightening with roles.
Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/phpbms/modules/mailchimp/scheduler_list_sync.php

    r686 r730  
    11<?php 
     2/* 
     3 $Rev: 267 $ | $LastChangedBy: brieb $ 
     4 $LastChangedDate: 2007-08-14 13:08:27 -0600 (Tue, 14 Aug 2007) $ 
     5 +-------------------------------------------------------------------------+ 
     6 | Copyright (c) 2004 - 2010, Kreotek LLC                                  | 
     7 | All rights reserved.                                                    | 
     8 +-------------------------------------------------------------------------+ 
     9 |                                                                         | 
     10 | Redistribution and use in source and binary forms, with or without      | 
     11 | modification, are permitted provided that the following conditions are  | 
     12 | met:                                                                    | 
     13 |                                                                         | 
     14 | - Redistributions of source code must retain the above copyright        | 
     15 |   notice, this list of conditions and the following disclaimer.         | 
     16 |                                                                         | 
     17 | - Redistributions in binary form must reproduce the above copyright     | 
     18 |   notice, this list of conditions and the following disclaimer in the   | 
     19 |   documentation and/or other materials provided with the distribution.  | 
     20 |                                                                         | 
     21 | - Neither the name of Kreotek LLC nor the names of its contributore may | 
     22 |   be used to endorse or promote products derived from this software     | 
     23 |   without specific prior written permission.                            | 
     24 |                                                                         | 
     25 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS     | 
     26 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT       | 
     27 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A | 
     28 | PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT      | 
     29 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,   | 
     30 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT        | 
     31 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,   | 
     32 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY   | 
     33 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT     | 
     34 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE   | 
     35 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.    | 
     36 |                                                                         | 
     37 +-------------------------------------------------------------------------+ 
     38*/ 
     39 
    240//uncomment if need debug 
    341if(!class_exists("appError")) 
    4         include_once("../../include/session.php"); 
    5          
     42    include_once("../../include/session.php"); 
     43 
    644include("include/MCAPI.class.php");//for MCAPI CLASS (listSync class uses it) 
    745include("include/list_sync.php");//for listSync class 
    846 
     47$querystatement = " 
     48    SELECT 
     49        roleid 
     50    FROM 
     51        tableoptions 
     52    WHERE 
     53        name= 'massemail' 
     54        AND tabledefid = 'tbld:6d290174-8b73-e199-fe6c-bcf3d4b61083' 
     55        "; 
     56 
     57$queryresult = $this->db->query($querystatement); 
     58 
     59$therecord = $this->db->fetchArray($queryresult); 
     60 
     61if(!hasRights($therecord["roleid"])) 
     62    exit(false); 
    963 
    1064$listSync = new listSync( 
     
    2074 
    2175if(isset($response["type"])){ 
    22      
     76 
    2377    if($response["type"] != "success") 
    2478       foreach($response["details"] AS $errorArray){ 
    25              
     79 
    2680            $message = "MailChimp sync ".$response["type"].": ".$errorArray["message"]." (".$errorArray["code"].")"; 
    2781            $log = new phpbmsLog($message, "SCHEDULER", NULL, $db); 
    28              
     82 
    2983       }//end if 
    30      
     84 
    3185}//end if 
    3286?> 
phpBMS vulnerability assesment provided by Orvant Inc. Copyright © 2010 Kreotek, LLC. All Rights reserved.