ed tags to original * * @param string $string * @param array $tags */ public static function unprotectForm(&$string, $tags = []) { // Protect entire form if (empty($tags)) { self::unprotect($string); return; } self::unprotectTags($string, $tags); } /** * Replace any protected text to original * * @param string $string */ public static function unprotectHtmlSafe(&$string) { $string = str_replace( [ self::$html_safe_start, self::$html_safe_end, self::$html_safe_tags_start, self::$html_safe_tags_end, ], [ self::$protect_start, self::$protect_end, self::$protect_tags_start, self::$protect_tags_end, ], $string ); self::unprotect($string); } /** * Replace any protected tags to original * * @param string $string * @param array $unprotected * @param array $protected */ public static function unprotectInString(&$string, $unprotected = [], $protected = []) { $protected = ! empty($protected) ? $protected : self::protectArray($unprotected); $string = str_replace($protected, $unprotected, $string); } /** * Decode string * * @param string $string * @param int $is_tag * * @return string */ public static function unprotectString($string, $is_tag = false) { if ($is_tag) { return self::$protect_tags_start . base64_decode($string) . self::$protect_tags_end; } return self::$protect_start . base64_decode($string) . self::$protect_end; } /** * Replace any protected tags to original * * @param string $string * @param array $tags * @param bool $include_closing_tags */ public static function unprotectTags(&$string, $tags = [], $include_closing_tags = true) { [$tags, $protected] = self::prepareTags($tags, $include_closing_tags); $string = str_replace($protected, $tags, $string); } /** * Wraps a style or javascript declaration with comment tags * * @param string $content * @param string $name * @param string $type * @param bool $minify */ public static function wrapDeclaration($content = '', $name = '', $type = 'styles', $minify = true) { if (empty($name)) { return $content; } [$start, $end] = self::getInlineCommentTags($name, $type); $spacer = $minify ? ' ' : "\n"; return $start . $spacer . $content . $spacer . $end; } /** * Wrap string in comment tags * * @param string $name * @param string $comment * * @return string */ public static function wrapInCommentTags($name, $string) { [$start, $end] = self::getCommentTags($name); return $start . $string . $end; } /** * Wraps a javascript declaration with comment tags * * @param string $content * @param string $name * @param bool $minify */ public static function wrapScriptDeclaration($content = '', $name = '', $minify = true) { return self::wrapDeclaration($content, $name, 'scripts', $minify); } /** * Wraps a stylesheet declaration with comment tags * * @param string $content * @param string $name * @param bool $minify */ public static function wrapStyleDeclaration($content = '', $name = '', $minify = true) { return self::wrapDeclaration($content, $name, 'styles', $minify); } /** * Check if the string contains certain substrings to protect * * @param string $string * @param array $search_strings * * @return bool */ private static function containsStringsToProtect($string, $search_strings = []) { if ( empty($string) || ( strpos($string, 'exists()) { return $cache->get(); } foreach ($tags as $i => $tag) { if (StringHelper::is_alphanumeric($tag[0])) { $tag = '{' . $tag; } $tags[$i] = $tag; if ($include_closing_tags) { $tags[] = RegEx::replace('^([^a-z0-9]+)', '\1/', $tag); } } return $cache->set([$tags, self::protectArray($tags, 1)]); } /** * Protect the input fields in the string * * @param string $string */ private static function protectFieldsInputFields(&$string) { if (strpos($string, '' . '|' . ')\s*)+' ); } /** * Protect the fields in the string * * @param string $string */ private static function protectFieldsPart(&$string) { self::protectFieldsTextAreas($string); self::protectFieldsInputFields($string); } /** * Protect the textarea fields in the string * * @param string $string */ private static function protectFieldsTextAreas(&$string) { if (strpos($string, ']*)?)>(\s*)', '<' . $temp_tag . '\1>\2' . $temp_tag . '>', $string ); self::protectByRegex( $string, '(?:' . '' . '\s*)+' ); // Replace back the temporarily replaced empty textareas $string = str_replace($temp_tag, 'textarea', $string); } /** * Protect part of the AdminForm * * @param string $string * @param array $tags * @param array $protected_tags */ private static function protectFormPart(&$string, $tags = [], $protected_tags = []) { if (strpos($string, '') === false) { return; } // Protect entire form if (empty($tags)) { $form_parts = explode('', $string, 2); $form_parts[0] = self::protectString($form_parts[0] . ''); $string = implode('', $form_parts); return; } $regex_tags = RegEx::quote($tags); if ( ! RegEx::match($regex_tags, $string)) { return; } $form_parts = explode('', $string, 2); // protect tags only inside form fields RegEx::matchAll( '(?:]*>.*?<\/textarea>|]*>)', $form_parts[0], $matches, null, PREG_PATTERN_ORDER ); if (empty($matches)) { return; } $matches = array_unique($matches[0]); foreach ($matches as $match) { $field = str_replace($tags, $protected_tags, $match); $form_parts[0] = str_replace($match, $field, $form_parts[0]); } $string = implode('', $form_parts); } /** * @param string $string * @param array $delimiters */ private static function unprotectByDelimiters(&$string, $delimiters) { if ( ! StringHelper::contains($string, $delimiters)) { return; } $regex = RegEx::preparePattern(RegEx::quote($delimiters), 's', $string); $parts = preg_split($regex, $string); foreach ($parts as $i => &$part) { if ($i % 2 == 0) { continue; } $part = base64_decode($part); } $string = implode('', $parts); } } 0 Class 'RegularLabs\Library\Protect' not found Contact mail@gemini-theme.com + 001 0231 123 32 Follow Info All demo content is for sample purposes only, intended to represent a live site. Please use the RocketLauncher to install an equivalent of the demo, all images will be replaced with sample images. Our college Back College Overview Our Houses & Neighbourhoods Our Senior Leadership Team Student Leadership 2025 School Policies Our College Uniform Operations Back A Typical School Day Booklists Subject Prices & Payments Bus Travel Information Traffic Management Mobile phone policy Curriculum Back Our goals for effective teaching Effective curriculum implementation Year 7 and Year 8 Year 9 Health Education Year 7, 8 & 9 Year 10 Specialist Koorie curriculum Accelerated and extra-curricular education High Ability Program Assessment and Reporting Languages at GSSC Senior School Back An Introduction to Senior School Year 11 & 12 Curriculum Victorian Certificate of Education (VCE) VCE Vocational Major (VCE VM) Pathways Mentor Program Community Partnerships Careers & Pathways School-based apprenticeships and traineeships Wellbeing & Inclusion Back The Team Around The Learner Addressing bullying and discrimination Multicultural Liaison Officers Ngarri Ngarri Team Support for Every Student House & Neighbourhood Design Determining Student Support Supporting students with additional needs External supports About us Back Contact our college Employment Opportunities Canteen Menu Enrolments Gallery News Year Book Enquire 0 Class 'RegularLabs\Library\Protect' not found © 2025 Greater Shepparton Secondary College | website by Mediart Solutions Bottom Menu Contact our college Publications Like us on Facebook
mail@gemini-theme.com + 001 0231 123 32
All demo content is for sample purposes only, intended to represent a live site. Please use the RocketLauncher to install an equivalent of the demo, all images will be replaced with sample images.