Plugin Directory

Changeset 3260565


Ignore:
Timestamp:
03/24/2025 06:25:47 AM (10 months ago)
Author:
Malcolm-OPH
Message:

Release 10.0.1

Location:
stageshow/trunk
Files:
128 added
19 edited
2 copied

Legend:

Unmodified
Added
Removed
  • stageshow/trunk/admin/js/datetimepicker_css.js

    r3258990 r3260565  
    9999   
    100100    this.Ctrl = pCtrl;
    101     this.Format = "ddMMyyyy";
     101    if (stageshowlib_dtFormat !== undefined && stageshowlib_dtFormat !== "")
     102        this.Format = stageshowlib_dtFormat;
     103    else   
     104        this.Format = "ddMMyyyy";
    102105    this.Separator = "-";
    103106    this.ShowTime = false;
     
    10901093    defaultTimeDate = typeof defaultTimeDate !== 'undefined' ? defaultTimeDate : '';
    10911094   
    1092     pFormat = 'yyyyMMdd';
    1093     pShowTime = true;
     1095    if (stageshowlib_dtFormat !== undefined && stageshowlib_dtFormat !== "")
     1096        pFormat = stageshowlib_dtFormat;
     1097    else   
     1098        pFormat = 'yyyyMMdd';
     1099
     1100        pShowTime = true;
    10941101    pShowSeconds = false;
    10951102   
  • stageshow/trunk/admin/js/stageshowlib_admin.js

    r2940230 r3260565  
    189189}
    190190
    191 function stageshowlib_OnTicketButtonClick(showEMailURL)
     191function stageshowlib_OnTicketButtonClick(showEMailURL, wpnonceId = '_wp_nonce_viewemail')
    192192{
    193193    var saleSelectObj = document.getElementById('TestSaleID');
    194194    saleId = saleSelectObj.value;
    195195   
    196     stageshowlib_OpenTicketView(saleId, showEMailURL, 'ShowEMailNOnce');
     196    stageshowlib_OpenTicketView(saleId, showEMailURL, wpnonceId);
    197197}
    198198
    199199function stageshowlib_OpenTicketView(saleId, showEMailURL, wpnonceId = '_wpnonce')
    200200{
    201     var wpnonceObj = document.getElementById(wpnonceId);
    202    
    203201    var sepChar = '?';
    204202    if (showEMailURL.indexOf('?') > 0)
     
    206204       
    207205    saleParam = 'id=' + saleId;
    208     wpnonceParam = '_wpnonce=' + wpnonceObj.value;
    209     url = showEMailURL + sepChar + saleParam + '&' + wpnonceParam;
     206    url = showEMailURL + sepChar + saleParam;
     207   
     208    if (wpnonceId !== '')
     209    {
     210        var wpnonceObj = document.getElementById(wpnonceId);   
     211        wpnonceParam = '_wpnonce=' + wpnonceObj.value;
     212        url = url + '&' + wpnonceParam;
     213    }
    210214   
    211215    var templateObj = document.getElementById('emailTemplate');
     
    216220    }
    217221   
     222    stageshowlib_OpenWindow(url);
     223}
     224
     225function stageshowlib_OpenWindow(url)
     226{
    218227    window.open(url);
    219228}
  • stageshow/trunk/admin/stageshow_manage_priceplans.php

    r3258990 r3260565  
    355355                $this->CheckAdminReferer();
    356356               
    357                 // Add Group with unique Group Name
    358                 $planID = $myDBaseObj->AddPlan('');
    359                
     357                $seatingID = StageShowLibUtilsClass::GetHTTPInteger('post', 'seatingID');   
     358               
     359                // Add Price Plan with unique ref
     360                $planID = $myDBaseObj->AddPlan('', $seatingID);
     361
    360362                if ($planID == 0)
    361363                    StageShowLibEscapingClass::SafeEchoHTML('<div id="message" class="error"><p>' . __('Cannot add a price plan', STAGESHOW_DOMAIN_NAME) . '</p></div>');
  • stageshow/trunk/include/stageshow_dbase_api.php

    r3258990 r3260565  
    193193                }
    194194            }
    195            
    196            
     195               
    197196            $this->PurgeSeatingPlans();
    198197           
     
    205204            }
    206205           
    207 //Dev Code Start --------------------------
    208             // Publish updates
    209             $this->PublishUpdates();
    210 //Dev Code End --------------------------
    211         }
    212            
    213 
    214 
     206        }
     207           
    215208        function RemovePriceRefsField()
    216209        {
     
    20562049        function GetPluginStatus()
    20572050        {
    2058             $pluginID = $this->get_name();
    2059             if ($pluginID == 'StageShow')
    2060             {
    2061                 return '';
    2062             }
    2063 
    2064             $installInsURL = STAGESHOW_URL.'docs/StageShowUnification.pdf';
    2065             $actionMsg = 'Sales of '.$pluginID.' have been discontinued, and the additional features that it provides have been added to the free version of StageShow hosted on Wordpress.org. <p>There will be no further updates of '.$pluginID.' and you should replace it with the StageShow plugin to continue to get updates. <p>Details on how to do this are <a href="'.$installInsURL.'">here</a>.';
    2066            
    2067             return $actionMsg;
     2051            return '';
    20682052        }
    20692053       
     
    21932177        }
    21942178       
    2195         function AddPlan($planRef = '', $priceType='', $priceValue=0.0)
     2179        function AddPlan($planRef = '', $planSeatingID = 0, $priceType='', $priceValue=0.0)
    21962180        {
    21972181            // Save the seatingID because AddPreset (called by AddPlan) uses it)
     
    22162200            }
    22172201                       
    2218             $sql = 'INSERT INTO '.STAGESHOW_PLANS_TABLE.'(planRef) VALUES("'.esc_sql($planRef).'")';
     2202            $sql = 'INSERT INTO '.STAGESHOW_PLANS_TABLE.'(planRef, seatingID) VALUES("'.esc_sql($planRef).'", "'.esc_sql($planSeatingID).'")';
    22192203            $this->query($sql);
    22202204                   
  • stageshow/trunk/include/stageshow_dstbarcode.php

    r3258990 r3260565  
    485485                $bigCenter = $img_width / 2;
    486486                $textCenter = $pxWid / 2;
    487                 imagestring($image, $this->fontSize, ($bigCenter - $textCenter) + 5, $img_height + 1, $text, $black);
     487                imagestring($image, $this->fontSize, intval($bigCenter - $textCenter + 5), intval($img_height + 1), $text, $black);
    488488            }
    489489           
  • stageshow/trunk/include/stageshow_sample_dbase.php

    r3258990 r3260565  
    478478        function AddSamplePlan($planRef)
    479479        {
    480             $planID = $this->myDBaseObj->AddPlan($planRef, '', -1);
     480            $planID = $this->myDBaseObj->AddPlan($planRef, 0, '', -1);
    481481           
    482482            if (($planRef == 'Evening') && ($planID > 0))
  • stageshow/trunk/include/stageshow_trolley_dbase_api.php

    r3258990 r3260565  
    13701370        function DeleteSeatLockout($stockID, $ticketSeat)
    13711371        {
    1372             global $jscode;         
    1373 
    13741372            if ($ticketSeat == '') return;
    13751373           
     
    14211419        function AddLayoutWrapper($template)
    14221420        {
     1421            global $jscode;         
     1422
    14231423            if (!defined('STAGESHOW_BOXOFFICE_ENABLESCROLL')) return $template;
    14241424
  • stageshow/trunk/include/stageshowlib_adminlist.php

    r3258990 r3260565  
    508508                    $editControl  = '<input type="text"'.$eventHandler.' size="'.$editSize.'" '.$controlIdDef.' value="'.$controlValue.'" />'."\n";
    509509                    if ($this->allowHiddenTags) $editControl .= '<input type="hidden" '.StageShowLibMigratePHPClass::Safe_str_replace('="', '="curr', $controlIdDef).' value="'.$controlValue.'" />'."\n";
     510                    $editControl .= $this->myDBaseObj->DateTimeFormatToJS();
     511                       
    510512                    $this->hasDateTimeEntry = true;
    511513                    break;
     
    12731275                {
    12741276                    $name = "{$columnID}-checkall";
    1275                     $pnlc = strtolower(GOLFSOC_PLUGIN_NAME);
     1277                    $pnlc = strtolower(STAGESHOWLIB_PLUGIN_ID);
    12761278                    $class = "{$name} {$pnlc}-checkall";
    12771279                    $columnSelectAll = "<input name=\"{$name}\" id=\"{$name}\" class=\"{$class}\" type=\"checkbox\"  onClick=\"StageShowLib_updateCheckboxes(this,event)\" />";
  • stageshow/trunk/include/stageshowlib_dbase_api.php

    r3258990 r3260565  
    4747    define('STAGESHOWLIB_SESSIONERR_NOMATCH', 4);
    4848
    49     class StageShowLibDBaseClass extends StageShowLibGenericDBaseClass // Define Class
     49    class StageShowLibDBaseClass extends StageShowLibGenericDBaseClass // Define class
    5050    {
    5151        const MYSQL_DATE_FORMAT = 'Y-m-d';
     
    9292
    9393            $this->opts = $opts;
    94             $this->getOptions();
     94            if ($opts['CfgOptionsID'] !== 'unused')
     95                $this->getOptions();
    9596
    9697        }
     
    262263        function AddGenericDBFields(&$event)
    263264        {
    264             $event->organisation = $this->adminOptions['OrganisationID'];
     265            $event->organisation = $this->adminOptions[STAGESHOWLIB_SITEID_OPTIONID];
    265266            if ($this->isOptionSet('HomePageURL'))
    266267            {
     
    306307
    307308            if ($caller == '')
    308                 return $theLink.'&caller=none';;
     309            {
     310                $theLink = StageShowLibEscapingClass::SafeAddQueryArg( 'caller', 'none', $theLink );
     311                return $theLink;
     312            }
    309313
    310314            $baseName = plugin_basename($caller);
     
    425429            $lastVersion = $this->adminOptions['LastVersion'];
    426430            if ($lastVersion == '')
    427                 return self::VERSION_NEWINSTALL;
    428 
    429             // Compare versions
    430             if ($currentVersion === $lastVersion)
    431                 return self::VERSION_UNCHANGED;
    432 
    433             // Save current version to options
    434             $this->adminOptions['LastVersion'] = $currentVersion;
    435             $this->saveOptions();
    436 
    437             return self::VERSION_CHANGED;
     431            {
     432                $rslt = self::VERSION_NEWINSTALL;
     433            }
     434            else if ($currentVersion === $lastVersion)
     435            {
     436                // Compare versions
     437                $rslt = self::VERSION_UNCHANGED;               
     438            }
     439            else
     440            {
     441                $rslt = self::VERSION_CHANGED;             
     442            }
     443           
     444            if ($rslt != self::VERSION_UNCHANGED)
     445            {
     446                // Save current version to options
     447                $this->adminOptions['LastVersion'] = $currentVersion;
     448                $this->saveOptions();
     449            }
     450
     451            return $rslt;
    438452        }
    439453
     
    815829                'LastVersion' => '',
    816830
    817                 'OrganisationID' => get_bloginfo('name'),
     831                STAGESHOWLIB_SITEID_OPTIONID => get_bloginfo('name'),
    818832
    819833                'BccEMailsToAdmin' => true,
     
    855869                $this->saveOptions();// Saving Options - in getOptions functions
    856870
    857 
    858871            return $ourOptions;
    859872        }
    860873
     874        function OutputSelectedDebug()
     875        {
     876        }
     877       
    861878        function GetAllSettingsList()
    862879        {
     
    871888
    872889            $settingsList[0] = $current;
    873 
    874890            return $settingsList;
    875891        }
     
    11921208            {
    11931209                // Add a dummy entry
     1210                $dbRecord = array();
    11941211                $dbRecord[0] = new stdClass();
    11951212            }
     
    13031320                // Search forwards for else marker (assumes later else markers have been processed)
    13041321                $elseStart = StageShowLibMigratePHPClass::Safe_strpos($EMailTemplate, $else_text, $nextPosn);
    1305                 if ($elseStart === false)
     1322                if (($elseStart === false) || ($elseStart > $sectionEnd))
    13061323                {
    13071324                    $ifTrueStart = $ifTagEndPosn+1;
     
    13481365                $EMailTemplate = $startText.$midText.$endText;
    13491366                $changes++;
    1350                        
     1367
    13511368                $offset = 0 - StageShowLibMigratePHPClass::SafeStrLen($midText) - StageShowLibMigratePHPClass::SafeStrLen($endText);
    13521369            }
     
    13901407            {
    13911408                $fileLen = filesize($Filepath);
     1409               
    13921410                if ($fileLen > 0)
    13931411                    $fileContents = fread($hfile, $fileLen);
     
    15021520            $emailRslt = $this->BuildEMailFromTemplate($eventRecord, $templatePath, $EMailTo);
    15031521            $rtnstatus = $emailRslt['status'];
    1504 
     1522           
    15051523            if ($rtnstatus == 'OK')
    15061524            {
     
    18581876        }
    18591877       
    1860         function PublishUpdates()
    1861         {
    1862             $target = $this->get_updpath();
    1863             StageShowLibHTTPIO::HTTPGet($target);
    1864         }
    1865        
    18661878        function ConvertDateTimeForMYSQL($dateTime)
    18671879        {
     
    18711883        }
    18721884
     1885        static function WriteToLog($logId, $msg, $append = true)
     1886        {
     1887            $flags = ($append) ? FILE_APPEND : '';
     1888            $logsPath = ABSPATH."/{$logId}.txt";
     1889           
     1890            $timestamp = current_time('timestamp');         
     1891            $localTime = date('Y-m-d H:i:s', $timestamp);
     1892   
     1893            file_put_contents($logsPath, "{$localTime} - {$msg}\n", $flags);
     1894        }
     1895
    18731896    }
    18741897}
  • stageshow/trunk/include/stageshowlib_dbase_base.php

    r3258990 r3260565  
    4747    }
    4848
     49    define('STAGESHOWLIB_DATETIMEFORMAT_UK', 'Y-m-d H:i');
     50    define('STAGESHOWLIB_DATETIMEFORMAT_US', 'Y-d-m H:i'); 
    4951    if (!defined('STAGESHOWLIB_DATETIMEFORMAT'))
    5052    {
    51         define('STAGESHOWLIB_DATETIMEFORMAT', 'd-m-Y H:i');
     53        define('STAGESHOWLIB_DATETIMEFORMAT', STAGESHOWLIB_DATETIMEFORMAT_UK);
    5254    }
    5355
    54     class StageShowLibGenericDBaseClass // Define Class
     56    class StageShowLibGenericDBaseClass // Define class
    5557    {
    5658        const ADMIN_SETTING = 1;
     
    5961        var $hideSQLErrors = false;
    6062
     63        static $tsFormat = '';
     64           
    6165        // This class does nothing when running under WP
    6266        // Overload this class with DB access functions for non-WP access
     
    282286        {
    283287            global $wpdb;
    284            
     288
    285289            $this->ShowSQL($sql);
    286        
     290
    287291            if ($this->hideSQLErrors)
    288292            {
     
    308312
    309313            return $rtnStatus;
     314        }
     315
     316        function GetRowsUpdated()
     317        {
     318            global $wpdb;
     319
     320            return $wpdb->rows_affected;
    310321        }
    311322
     
    503514        }
    504515
     516        static function GetDateTimeFormat()
     517        {
     518            $tsFormat = STAGESHOWLIB_DATETIMEFORMAT;
     519            if ($tsFormat === STAGESHOWLIB_DATETIMEFORMAT_US)
     520                return STAGESHOWLIB_DATETIMEFORMAT_US;
     521           
     522            return STAGESHOWLIB_DATETIMEFORMAT_UK;
     523        }
     524
     525        static function DateTimeFormatToJS()
     526        {
     527            global $jscode;
     528           
     529            $jsRtn = '';
     530            static $firstCall = true;
     531           
     532            if ($firstCall)
     533            {
     534                self::$tsFormat = self::GetDateTimeFormat();
     535                $isUK = (strcmp(self::$tsFormat, STAGESHOWLIB_DATETIMEFORMAT_UK) == 0);
     536                $dtFormat = $isUK ? 'YYYYMMDD' : 'YYYYDDMM';
     537                $jsRtn = "<$jscode>var stageshowlib_dtFormat = \"$dtFormat\"</script>\n";
     538                $firstCall = false;
     539            }   
     540           
     541            return $jsRtn;     
     542        }
     543
    505544        static function FormatDateForAdminDisplay($dateInDB)
    506         {
     545        {           
     546            StageShowLibEscapingClass::SafeEchoScript(self::DateTimeFormatToJS());
     547
    507548            // Convert time string to UNIX timestamp
    508549            $timestamp = StageShowLibMigratePHPClass::Safe_strtotime( $dateInDB );
    509550
    510551            // Get Time & Date formatted for display to user
    511             return date(STAGESHOWLIB_DATETIMEFORMAT, $timestamp);
     552            $formattedDT = date(self::$tsFormat, $timestamp);
     553           
     554            return $formattedDT;
    512555        }
    513556       
  • stageshow/trunk/include/stageshowlib_escaping.php

    r3258990 r3260565  
    2323if (!class_exists('StageShowLibEscapingClass'))
    2424{
    25     class StageShowLibEscapingClass  // Define Class
     25
     26    class StageShowLibEscapingClass  // Define class
    2627    {
    2728        public static $inJS = false;
     
    3738            return $url;
    3839        }
    39            
     40
    4041        static function SafeRemoveQueryArg($key, $query = false)
    4142        {
     
    6263            $escData = "";
    6364            $codeStartOffset = 0;
    64 
     65           
    6566            while (true)
    6667            {
     
    7273                $html = StageShowLibMigratePHPClass::SafeSubStr($echoData, $codeStartOffset, $scriptStartOffset-$codeStartOffset);
    7374                $escData .= wp_kses($html, $htmlTags, $protocols);
    74            
     75               
    7576                // Find end of Script code
    7677                $scriptEndOffset = StageShowLibMigratePHPClass::Safe_strpos($echoData, "</script", $scriptStartOffset);
     
    8384                $codeStartOffset = $scriptEndOffset + 1;
    8485            }
    85        
     86           
    8687            // Handle remainder of HTML
    8788            $html = StageShowLibMigratePHPClass::SafeSubStr($echoData, $codeStartOffset);
    88 
    8989            $escData .= wp_kses($html, $htmlTags, $protocols);
    90            
     90
    9191            echo StageShowLibEscapingClass::SafeTrapXSS($escData);
    9292        }
     
    137137            global $jscode;     
    138138           
    139             if (is_null($js)) return;
    140                            
     139            if (is_null($js) || ($js === '')) return;
     140               
    141141            self::SessionCheck();
    142142            // Handle buffering up Javascript output
     
    171171        }
    172172       
     173
    173174        static function SafeEchoExport($exportData)
    174175        {
  • stageshow/trunk/include/stageshowlib_gatewaysalesadmin.php

    r3258990 r3260565  
    424424                // Sale Editor ... output tickets selector
    425425                $pluginObj = $this->env['PluginObj'];
    426                 StageShowLibEscapingClass::SafeEchoHTML($pluginObj->OutputContent_DoShortcode(NULL, true));
     426               
     427                // Buffer here to block decoding of script tags
     428                ob_start();     
     429                $html = $pluginObj->OutputContent_DoShortcode(NULL, true);
     430                ob_end_flush();
     431               
     432                StageShowLibEscapingClass::SafeEchoHTML($html);
    427433                return '';
    428434            }
  • stageshow/trunk/include/stageshowlib_htmlemail_api.php

    r3258990 r3260565  
    2525   
    2626    define('STAGESHOWLIB_FILENAME_EMAILLOG', 'EMailLog.log');
    27     class StageShowLibHTMLEMailAPIClass // Define Class
     27    class StageShowLibHTMLEMailAPIClass // Define class
    2828    {   
    2929        var $fileobjs = array();
     
    185185        {
    186186            // FUNCTIONALITY: EMail - Create TEXT content from HTML content
    187             global $jscode;
    188187           
    189188            // Change <br> and <p> to line feeds
     
    217216
    218217            $search = array (
    219                 "'&nbsp;'si",                       // Space
    220                 "'<script[^>]*?>.*?</script>'si",   // Javascript
    221                 "'([\r\n])[\s]+'",                  // White space
    222                 "'<(br|p|\/tr).*?>'i",              // End of Line
    223                 "'<[/!]*?[^<>]*?>'si");             // All HTML tags
     218                "'&nbsp;'si",                           // Space
     219                "'<script[^>]*?>.*?</script>'si",       // Javascript
     220                "'([\r\n])[\s]+'",                      // White space
     221                "'<(br|p|\/tr).*?>'i",                  // End of Line
     222                "'<[/!]*?[^<>]*?>'si");                 // All HTML tags
    224223               
    225224            $replace = array (
  • stageshow/trunk/include/stageshowlib_sales_trolley_dbase_api.php

    r3258990 r3260565  
    894894                else
    895895                {
    896                     $eventId = "\"stageshowlib_OnTicketButtonClick('".$showEMailURL."')\"";
     896                    $eventId = "\"stageshowlib_OnTicketButtonClick('".$showEMailURL."', 'ShowEMailNOnce')\"";
    897897                }
    898898               
  • stageshow/trunk/include/stageshowlib_settingsadmin.php

    r3258990 r3260565  
    2727{
    2828    if (!defined('STAGESHOWLIB_DEFAULT_TEMPLATES_PATH'))
    29         define('STAGESHOWLIB_DEFAULT_TEMPLATES_PATH', dirname(__FILE__) . '/templates/');
     29        define('STAGESHOWLIB_DEFAULT_TEMPLATES_PATH', dirname(__FILE__, 2) . '/templates/');
    3030
    3131    class StageShowLibSettingsAdminClass extends StageShowLibAdminClass // Define Class
  • stageshow/trunk/include/stageshowlib_table.php

    r3258990 r3260565  
    2929        define('STAGESHOWLIB_DISABLE_POSTCONTROLS', true);
    3030   
    31     class StageShowLibTableUtilsClass // Define Class
     31    class StageShowLibTableUtilsClass // Define class
    3232    {
    3333        static function GetCurrentPage()
     
    4040    }
    4141   
    42     class StageShowLibTableClass // Define Class
     42    class StageShowLibTableClass // Define class
    4343    {
    4444        const HEADERPOSN_TOP = 1;
     
    199199            $this->moreScriptsOutput = false;
    200200           
    201             $this->detailsRowsDef = array_merge($this->GetDetailsRowsDefinition(), $this->GetDetailsRowsFooter());         
     201            $this->detailsRowsDef = array_merge($this->GetDetailsRowsDefinition(), $this->GetDetailsRowsFooter());
    202202               
    203203            $this->moreText = __('Show', STAGESHOWLIB_DOMAIN_NAME);
     
    233233        {
    234234            return array();
     235        }
     236       
     237        function GetDetailsRowsDefaults()
     238        {
     239            $rowDefauls = array();         
     240            $rowDefs = $this->GetDetailsRowsDefinition();
     241//StageShowLibUtilsClass::print_r($rowDefs, '$rowDefs');
     242
     243            foreach ($rowDefs as $rowDef)   
     244            {
     245                if (isset($rowDef[self::TABLEPARAM_DEFAULT]))
     246                {
     247                    $defaultRow = array();
     248                   
     249                    $rowID = $rowDef[self::TABLEPARAM_ID];
     250                    $rowDefault = $rowDef[self::TABLEPARAM_DEFAULT];
     251
     252                    $defaultRow[self::TABLEPARAM_ID] = $rowDef[self::TABLEPARAM_ID];
     253                    $defaultRow[self::TABLEPARAM_DEFAULT] = $rowDef[self::TABLEPARAM_DEFAULT];
     254                   
     255                    $rowDefauls[] = $defaultRow;
     256                }
     257            }       
     258
     259            return $rowDefauls;
    235260        }
    236261       
  • stageshow/trunk/include/stageshowlib_utils.php

    r3258990 r3260565  
    3535        define('STAGESHOWLIB_CALLBACK_BASENAME', basename(dirname(dirname(__FILE__))).'_callback');
    3636
    37     class StageShowLibUtilsClass // Define Class
     37    class StageShowLibUtilsClass // Define class
    3838    {
    3939        static function GetSiteID()
     
    432432        {
    433433            $currentURL  = self::GetPageHost();
    434             $currentURL .= self::GetHTTPTextElem('server', 'REQUEST_URI');
     434            $currentURL .= self::GetRequestURI();
    435435            return $currentURL;
     436        }
     437
     438        static function GetRequestURI()
     439        {
     440            return self::GetHTTPTextElem('server', 'REQUEST_URI');
    436441        }
    437442
     
    689694            $html_rtnVal = '';
    690695
     696            $isDevCode = false;
     697
     698            if (!$isDevCode && !$return) return '';
     699               
     700            // wp_get_current_user only loaded after plugins have initialised ...
     701            if (function_exists('wp_get_current_user'))
     702            {
     703                if (!current_user_can('manage_options')) return '';
     704            }
     705
     706            if (is_string($obj))
     707            {
     708                $name = '$_'.StageShowLibMigratePHPClass::Safe_strtoupper($obj);
     709                $arr = &self::GetArrayFromId($obj, false);
     710                if ($arr != null) $obj = $arr;
     711            }
     712
     713            $html_rtnVal = $eol;
     714            if ($name !== '') $html_rtnVal .= $name.$eol."\n";
     715            $html = print_r($obj, true);
     716            //$html = htmlspecialchars($html);
     717            $html_rtnVal .= StageShowLibMigratePHPClass::Safe_str_replace("\n", "$eol\n", $html);
     718            //$html_rtnVal .= "$eol\n";
     719
     720            if (!$return) StageShowLibEscapingClass::SafeEchoHTML($html_rtnVal, false);
     721
    691722            return $html_rtnVal;
    692723        }
  • stageshow/trunk/js/stageshowlib_js.js

    r2955460 r3260565  
    486486    if (event.altKey || event.ctrlKey)
    487487    {
     488        console.log('Keypress - Alt or Ctrl: ');
    488489        return true;
    489490    }
     
    491492    if (event.keyCode == 13)
    492493    {
     494        console.log('Keypress - Key: CR');
    493495        event.preventDefault();
    494496        return false;
    495497    }
    496498   
     499    console.log('Keypress - Keycode: ' + event.charCode);
    497500    if (event.charCode > 32)
    498501    {
     
    929932}
    930933
    931 function StageShowLib_updateCheckboxes(obj)
    932 {
    933     var boxid = 'rowSelect[]';
    934    
    935     var elem = StageShowLib_getParentNode(obj, 'FORM');
    936     elem = elem.elements;
    937    
     934function StageShowLib_updateCheckboxes(obj, event)
     935{
    938936    var newState = obj.checked;             
    939     for(var i = 0; i < elem.length; i++)
    940     {
    941         if (elem[i].name == boxid)
    942             elem[i].checked = newState;
    943        
    944         if (elem[i].name == obj.name)
    945             elem[i].checked = newState;
     937       
     938    var reqClass = obj.className;
     939    var targetClasses = reqClass.split(" ");
     940    for (var i=0; i<targetClasses.length; i++)
     941    {
     942        var targetClass = targetClasses[i].replace('checkall', 'checkbox');
     943        var targetElems = jQuery("."+targetClass);
     944        for(var i = 0; i < targetElems.length; i++)
     945        {
     946            var targetElem = targetElems[i];
     947            targetElem.checked = newState;
     948            if (typeof targetElem.onChange == 'function')
     949            {
     950                targetElem.onchange(obj, event);
     951            }
     952        }
    946953    }
    947954       
    948     //var eventtype = event.type;
     955    return;
    949956}
    950957
  • stageshow/trunk/lang/stageshow.pot

    r3258990 r3260565  
    33msgid ""
    44msgstr ""
    5 "Project-Id-Version: StageShow (Dev) 10.0\n"
     5"Project-Id-Version: StageShow (Dev) 10.0.0.1\n"
    66"Report-Msgid-Bugs-To: http://wordpress.org/tag/stageshow\n"
    7 "POT-Creation-Date: 2025-03-18 17:54:16+00:00\n"
     7"POT-Creation-Date: 2025-03-23 15:13:26+00:00\n"
    88"MIME-Version: 1.0\n"
    99"Content-Type: text/plain; charset=UTF-8\n"
     
    123123#: admin\stageshow_manage_prices.php:507
    124124#: admin\stageshow_manage_seating.php:797 admin\stageshow_manage_shows.php:426
    125 #: include\mjslib_gatewaysalesadmin.php:575
     125#: include\mjslib_gatewaysalesadmin.php:581
    126126msgid "Nothing to Delete"
    127127msgstr ""
     
    140140
    141141#: admin\stageshow_manage_overview.php:138
    142 #: include\mjslib_gatewaysalesadmin.php:481
     142#: include\mjslib_gatewaysalesadmin.php:487
    143143msgid "No Sales"
    144144msgstr ""
     
    178178msgstr ""
    179179
    180 #: admin\stageshow_manage_overview.php:321 include\mjslib_dbase_api.php:1990
     180#: admin\stageshow_manage_overview.php:321 include\mjslib_dbase_api.php:2019
    181181msgid "Here"
    182182msgstr ""
     
    302302#: admin\stageshow_manage_performances.php:522
    303303#: admin\stageshow_manage_prices.php:369 admin\stageshow_manage_shows.php:51
    304 #: include\stageshow_dbase_api.php:881
     304#: include\stageshow_dbase_api.php:880
    305305msgid "Active"
    306306msgstr ""
    307307
    308308#: admin\stageshow_manage_performances.php:128
    309 #: include\stageshow_dbase_api.php:883
     309#: include\stageshow_dbase_api.php:882
    310310msgid "INACTIVE"
    311311msgstr ""
     
    439439#: admin\stageshow_manage_priceplans.php:70
    440440#: admin\stageshow_manage_prices.php:73
    441 #: admin\stageshow_manage_settings.php:171 include\mjslib_debug.php:183
     441#: admin\stageshow_manage_settings.php:171 include\mjslib_debug.php:200
    442442#: stageshow_trolley.php:1070
    443443msgid "Disabled"
     
    854854
    855855#: admin\stageshow_manage_tools.php:225 include\mjslib_table.php:203
    856 #: include\mjslib_table.php:689 include\stageshow_trolley_sales.php:47
     856#: include\mjslib_table.php:714 include\stageshow_trolley_sales.php:47
    857857#: stageshow_translations.php:156
    858858msgid "Show"
     
    970970
    971971#: admin\stageshow_tdt_export.php:159 include\mjslib_sales_dbase_api.php:557
    972 #: include\stageshow_dbase_api.php:2513 include\stageshow_dbase_api.php:4308
     972#: include\stageshow_dbase_api.php:2517 include\stageshow_dbase_api.php:4312
    973973#: stageshow_trolley.php:299
    974974msgid "Discount"
     
    10301030
    10311031#: admin\stageshow_tdt_export.php:178 include\mjslib_sales_dbase_api.php:558
    1032 #: include\stageshow_dbase_api.php:2514
     1032#: include\stageshow_dbase_api.php:2518
    10331033#: include\stageshow_trolley_sales.php:666 stageshow_translations.php:25
    10341034msgid "Booking Fee"
     
    10401040
    10411041#: admin\stageshow_tdt_export.php:180 include\mjslib_sales_dbase_api.php:559
    1042 #: include\stageshow_dbase_api.php:2515 include\stageshow_pir_export.php:55
     1042#: include\stageshow_dbase_api.php:2519 include\stageshow_pir_export.php:55
    10431043#: stageshow_translations.php:60 stageshow_trolley.php:327
    10441044msgid "Donation"
     
    12401240msgstr ""
    12411241
    1242 #: include\mjslib_adminlist.php:487 include\mjslib_adminlist.php:779
    1243 #: include\mjslib_adminlist.php:814
     1242#: include\mjslib_adminlist.php:491 include\mjslib_adminlist.php:785
     1243#: include\mjslib_adminlist.php:820
    12441244msgid "Yes"
    12451245msgstr ""
    12461246
    1247 #: include\mjslib_adminlist.php:487 include\mjslib_adminlist.php:779
    1248 #: include\mjslib_adminlist.php:814
     1247#: include\mjslib_adminlist.php:491 include\mjslib_adminlist.php:785
     1248#: include\mjslib_adminlist.php:820
    12491249msgid "No"
    12501250msgstr ""
    12511251
    1252 #: include\mjslib_adminlist.php:1214
     1252#: include\mjslib_adminlist.php:1220
    12531253msgid "OK"
    12541254msgstr ""
    12551255
    1256 #: include\mjslib_adminlist.php:1215 include\mjslib_settingsadmin.php:342
     1256#: include\mjslib_adminlist.php:1221 include\mjslib_settingsadmin.php:342
    12571257#: stageshow_trolley.php:926
    12581258msgid "Cancel"
    12591259msgstr ""
    12601260
    1261 #: include\mjslib_dbase_api.php:594
     1261#: include\mjslib_dbase_api.php:608
    12621262msgid "Session Debug Modes"
    12631263msgstr ""
    12641264
    1265 #: include\mjslib_dbase_api.php:612
     1265#: include\mjslib_dbase_api.php:626
    12661266msgid "SSL over HTTP"
    12671267msgstr ""
    12681268
    1269 #: include\mjslib_dbase_api.php:1407
     1269#: include\mjslib_dbase_api.php:1430
    12701270msgid "Missing Conditional end marker"
    12711271msgstr ""
    12721272
    1273 #: include\mjslib_dbase_api.php:1527
     1273#: include\mjslib_dbase_api.php:1551
    12741274msgid ""
    12751275"WARNING: EMail Template contains one or mores lines with leading dots ('.')"
    12761276msgstr ""
    12771277
    1278 #: include\mjslib_dbase_api.php:1990
     1278#: include\mjslib_dbase_api.php:2019
    12791279msgid "Timezone not set - Set it"
    12801280msgstr ""
    12811281
    1282 #: include\mjslib_dbase_api.php:1997
     1282#: include\mjslib_dbase_api.php:2026
    12831283msgid "Plugin"
    12841284msgstr ""
    12851285
    1286 #: include\mjslib_dbase_api.php:1998
     1286#: include\mjslib_dbase_api.php:2027
    12871287msgid "Version"
    12881288msgstr ""
    12891289
    1290 #: include\mjslib_dbase_api.php:2005
     1290#: include\mjslib_dbase_api.php:2034
    12911291msgid "Timezone"
    12921292msgstr ""
    12931293
    1294 #: include\mjslib_debug.php:183
     1294#: include\mjslib_debug.php:200
    12951295msgid "Enabled"
    12961296msgstr ""
     
    13591359msgstr ""
    13601360
    1361 #: include\mjslib_gatewaysalesadmin.php:443
     1361#: include\mjslib_gatewaysalesadmin.php:449
    13621362msgid "Search Results"
    13631363msgstr ""
    13641364
    1365 #: include\mjslib_gatewaysalesadmin.php:445
     1365#: include\mjslib_gatewaysalesadmin.php:451
    13661366msgid "Summary"
    13671367msgstr ""
    13681368
    1369 #: include\mjslib_gatewaysalesadmin.php:450 stageshow_translations.php:11
     1369#: include\mjslib_gatewaysalesadmin.php:456 stageshow_translations.php:11
    13701370msgid "Add Sale"
    13711371msgstr ""
    13721372
    1373 #: include\mjslib_gatewaysalesadmin.php:571
     1373#: include\mjslib_gatewaysalesadmin.php:577
    13741374msgid "Sale Entry does not exist in Database"
    13751375msgid_plural "Sale Entries do not exist in Database"
     
    13771377msgstr[1] ""
    13781378
    1379 #: include\mjslib_gatewaysalesadmin.php:573
     1379#: include\mjslib_gatewaysalesadmin.php:579
    13801380msgid "Sale has been deleted"
    13811381msgid_plural "Sales have been deleted"
     
    13911391msgstr ""
    13921392
    1393 #: include\mjslib_htmlemail_api.php:562
     1393#: include\mjslib_htmlemail_api.php:561
    13941394msgid "Duplicate Content-Type header removed from PHPMailer"
    13951395msgstr ""
     
    14471447#: include\mjslib_salesplugin.php:695 include\mjslib_salesplugin.php:726
    14481448#: include\mjslib_salesplugin.php:761 include\mjslib_salesplugin.php:807
    1449 #: include\mjslib_salesplugin.php:844 include\stageshow_dbase_api.php:2496
     1449#: include\mjslib_salesplugin.php:844 include\stageshow_dbase_api.php:2500
    14501450#: stageshow_main.php:883 stageshow_main.php:1034
    14511451msgid "Cannot Checkout"
     
    14981498msgstr ""
    14991499
    1500 #: include\mjslib_plugin.php:55
     1500#: include\mjslib_plugin.php:58
    15011501msgid "not specified"
    1502 msgstr ""
    1503 
    1504 #: include\mjslib_plugin.php:78
    1505 msgid "NOnce Error"
    15061502msgstr ""
    15071503
     
    17671763msgstr ""
    17681764
    1769 #: include\mjslib_table.php:204 include\mjslib_table.php:690
     1765#: include\mjslib_table.php:204 include\mjslib_table.php:715
    17701766msgid "Hide"
    17711767msgstr ""
    17721768
    1773 #: include\mjslib_table.php:667
     1769#: include\mjslib_table.php:692
    17741770msgid "Bulk Actions"
    17751771msgstr ""
    17761772
    1777 #: include\mjslib_table.php:677
     1773#: include\mjslib_table.php:702
    17781774msgid "Apply"
    17791775msgstr ""
    17801776
    1781 #: include\mjslib_table.php:760
     1777#: include\mjslib_table.php:785
    17821778msgid "1 item"
    17831779msgid_plural "%s items"
     
    17851781msgstr[1] ""
    17861782
    1787 #: include\mjslib_table.php:776
     1783#: include\mjslib_table.php:801
    17881784msgid "Go to the first page"
    17891785msgstr ""
    17901786
    1791 #: include\mjslib_table.php:783
     1787#: include\mjslib_table.php:808
    17921788msgid "Go to the previous page"
    17931789msgstr ""
    17941790
    1795 #: include\mjslib_table.php:794
     1791#: include\mjslib_table.php:819
    17961792msgid "Current page"
    17971793msgstr ""
    17981794
    1799 #: include\mjslib_table.php:802
     1795#: include\mjslib_table.php:827
    18001796msgid "of"
    18011797msgstr ""
    18021798
    1803 #: include\mjslib_table.php:806
     1799#: include\mjslib_table.php:831
    18041800msgid "Go to the next page"
    18051801msgstr ""
    18061802
    1807 #: include\mjslib_table.php:813
     1803#: include\mjslib_table.php:838
    18081804msgid "Go to the last page"
    18091805msgstr ""
     
    18451841msgstr ""
    18461842
    1847 #: include\stageshow_dbase_api.php:729
     1843#: include\stageshow_dbase_api.php:728
    18481844msgid "Internal Error - showID"
    18491845msgstr ""
    18501846
    1851 #: include\stageshow_dbase_api.php:779 include\stageshow_dbase_api.php:803
     1847#: include\stageshow_dbase_api.php:778 include\stageshow_dbase_api.php:802
    18521848msgid "New Performance Added"
    18531849msgstr ""
    18541850
    1855 #: include\stageshow_dbase_api.php:801
     1851#: include\stageshow_dbase_api.php:800
    18561852msgid "Performance Reference is not unique"
    18571853msgstr ""
    18581854
    1859 #: include\stageshow_dbase_api.php:877
     1855#: include\stageshow_dbase_api.php:876
    18601856msgid "DELETED"
    18611857msgstr ""
    18621858
    1863 #: include\stageshow_dbase_api.php:1130
     1859#: include\stageshow_dbase_api.php:1129
    18641860msgid "Unnamed Show"
    18651861msgstr ""
    18661862
    1867 #: include\stageshow_dbase_api.php:1195
     1863#: include\stageshow_dbase_api.php:1194
    18681864msgid "DB Error"
    18691865msgstr ""
    18701866
    1871 #: include\stageshow_dbase_api.php:1195
     1867#: include\stageshow_dbase_api.php:1194
    18721868msgid "Column does not exist"
    18731869msgstr ""
    18741870
    1875 #: include\stageshow_dbase_api.php:1386
     1871#: include\stageshow_dbase_api.php:1385
    18761872msgid "Price Not Specified"
    18771873msgstr ""
    18781874
    1879 #: include\stageshow_dbase_api.php:1392
     1875#: include\stageshow_dbase_api.php:1391
    18801876msgid "Invalid Price Entry"
    18811877msgstr ""
    18821878
    1883 #: include\stageshow_dbase_api.php:1398
     1879#: include\stageshow_dbase_api.php:1397
    18841880msgid "Price Entry cannot be negative"
    18851881msgstr ""
    18861882
    1887 #: include\stageshow_dbase_api.php:2007
     1883#: include\stageshow_dbase_api.php:2006
    18881884msgid "Qty"
    18891885msgstr ""
    18901886
    1891 #: include\stageshow_dbase_api.php:2012 include\stageshow_dbase_api.php:2871
     1887#: include\stageshow_dbase_api.php:2011 include\stageshow_dbase_api.php:2875
    18921888#: stageshow_translations.php:147 stageshow_trolley.php:80
    18931889msgid "Seat"
    18941890msgstr ""
    18951891
    1896 #: include\stageshow_dbase_api.php:2497
     1892#: include\stageshow_dbase_api.php:2501
    18971893msgid "Database Access Error"
    18981894msgstr ""
    18991895
    1900 #: include\stageshow_dbase_api.php:2760
     1896#: include\stageshow_dbase_api.php:2764
    19011897msgid "Error Finding Tag"
    19021898msgstr ""
    19031899
    1904 #: include\stageshow_dbase_api.php:2768
     1900#: include\stageshow_dbase_api.php:2772
    19051901msgid "Missing \" in Tag Param"
    19061902msgstr ""
    19071903
    1908 #: include\stageshow_dbase_api.php:2778
     1904#: include\stageshow_dbase_api.php:2782
    19091905msgid "Missing End of Tag Marker"
    19101906msgstr ""
    19111907
    1912 #: include\stageshow_dbase_api.php:2871
     1908#: include\stageshow_dbase_api.php:2875
    19131909msgid "Row"
    19141910msgstr ""
    19151911
    1916 #: include\stageshow_dbase_api.php:2946
     1912#: include\stageshow_dbase_api.php:2950
    19171913msgid "No Zone Found for Seat"
    19181914msgstr ""
    19191915
    1920 #: include\stageshow_dbase_api.php:2972
     1916#: include\stageshow_dbase_api.php:2976
    19211917msgid "Seating Plan Updated"
    19221918msgstr ""
    19231919
    1924 #: include\stageshow_dbase_api.php:2987 include\stageshow_dbase_api.php:2999
    1925 #: include\stageshow_dbase_api.php:3008
     1920#: include\stageshow_dbase_api.php:2991 include\stageshow_dbase_api.php:3003
     1921#: include\stageshow_dbase_api.php:3012
    19261922msgid "Template Import Error"
    19271923msgstr ""
    19281924
    1929 #: include\stageshow_dbase_api.php:2988
     1925#: include\stageshow_dbase_api.php:2992
    19301926msgid "Seating ID not specified"
    19311927msgstr ""
    19321928
    1933 #: include\stageshow_dbase_api.php:3000
     1929#: include\stageshow_dbase_api.php:3004
    19341930msgid "Empty Filename"
    19351931msgstr ""
    19361932
    1937 #: include\stageshow_dbase_api.php:3009
     1933#: include\stageshow_dbase_api.php:3013
    19381934msgid "Empty File"
    19391935msgstr ""
    19401936
    1941 #: include\stageshow_dbase_api.php:3741
     1937#: include\stageshow_dbase_api.php:3745
    19421938msgid "Invalid Seat Specification"
    19431939msgstr ""
    19441940
    1945 #: include\stageshow_dbase_api.php:3754
     1941#: include\stageshow_dbase_api.php:3758
    19461942msgid "Seat Specification invalid for unallocated zone"
    19471943msgstr ""
    19481944
    1949 #: include\stageshow_dbase_api.php:3811
     1945#: include\stageshow_dbase_api.php:3815
    19501946msgid "Location Used Twice"
    19511947msgstr ""
    19521948
    1953 #: include\stageshow_dbase_api.php:3860
     1949#: include\stageshow_dbase_api.php:3864
    19541950msgid "Seats Requested"
    19551951msgstr ""
    19561952
    1957 #: include\stageshow_dbase_api.php:3861
     1953#: include\stageshow_dbase_api.php:3865
    19581954msgid "Seats Selected"
    19591955msgstr ""
  • stageshow/trunk/readme.txt

    r3258990 r3260565  
    22Contributors: Malcolm-OPH
    33Donate link: https://www.corondeck.co.uk/StageShow/donate.html
    4 Tags: admin, calendar, cart, cinema, e-commerce, events, mollie, pages, payment, payments, paypal, posts, show, stripe, theater, theatre, tickets, trolley, user
     4Tags: cart, payment, theater, theatre, tickets
    55Requires at least: 3.0
    66Tested up to: 6.7.2
    7 Stable tag: 10.0
     7Stable tag: 10.0.1
    88License: GPLv2 or later
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    186186== Changelog ==
    187187
     188= 10.0.1 (23/03/2025) =
     189* Bug Fix: Manual entry or editing of sales
     190* Bug Fix: Add Price Plan not adding Seating Plan
     191* Bug Fix: Undefined variable $jscode (since 10.0)
     192* Fixed Float to Int Warning displaying barcode
     193* Stripe php library updated
     194
    188195= 10.0 (20/03/2025) =
    189196* Security Update
  • stageshow/trunk/stageshow.php

    r3258990 r3260565  
    33Plugin Name: StageShow
    44Plugin URI: http://wordpress.org/plugins/stageshow/
    5 Version: 10.0
     5Version: 10.0.1
    66Author: Malcolm Shergold
    77Author URI: http://corondeck.co.uk
Note: See TracChangeset for help on using the changeset viewer.