mirror of
https://github.com/e107inc/e107.git
synced 2025-08-02 20:57:26 +02:00
More cleanup
This commit is contained in:
@@ -63,12 +63,6 @@ $creditsArray = array(
|
|||||||
"version" => "0.1",
|
"version" => "0.1",
|
||||||
"licence" => "GPL, ".CRELAN_8
|
"licence" => "GPL, ".CRELAN_8
|
||||||
),
|
),
|
||||||
array( "name" => "DHTML / JavaScript Calendar",
|
|
||||||
"url" => "http://www.dynarch.com/projects/",
|
|
||||||
"description" => CRELAN_17,
|
|
||||||
"version" => "1.0",
|
|
||||||
"licence" => "GPL"
|
|
||||||
),
|
|
||||||
array( "name" => "FPDF",
|
array( "name" => "FPDF",
|
||||||
"url" => "http://www.fpdf.org/",
|
"url" => "http://www.fpdf.org/",
|
||||||
"description" => CRELAN_18,
|
"description" => CRELAN_18,
|
||||||
|
@@ -728,8 +728,7 @@ class admin_newspost
|
|||||||
|
|
||||||
require_once(e_HANDLER."cache_handler.php");
|
require_once(e_HANDLER."cache_handler.php");
|
||||||
require_once(e_HANDLER."news_class.php");
|
require_once(e_HANDLER."news_class.php");
|
||||||
// require_once(e_HANDLER."calendar/calendar_class.php");
|
|
||||||
// $this->_cal = new DHTML_Calendar(true);
|
|
||||||
|
|
||||||
$this->_pst = $pstobj;
|
$this->_pst = $pstobj;
|
||||||
|
|
||||||
@@ -1077,7 +1076,7 @@ class admin_newspost
|
|||||||
|
|
||||||
$_POST['news_start'] = vartrue(e107::getDate()->convert($_POST['news_start'],'inputdatetime'), 0);
|
$_POST['news_start'] = vartrue(e107::getDate()->convert($_POST['news_start'],'inputdatetime'), 0);
|
||||||
|
|
||||||
echo "date=".$_POST['news_start'];
|
// echo "date=".$_POST['news_start'];
|
||||||
if($_POST['news_start'])
|
if($_POST['news_start'])
|
||||||
{
|
{
|
||||||
// $_POST['news_start'] = e107::getDate()->convert($_POST['news_start']);
|
// $_POST['news_start'] = e107::getDate()->convert($_POST['news_start']);
|
||||||
|
@@ -34,16 +34,13 @@ include_lan(e_LANGUAGEDIR.e_LANGUAGE.'/admin/lan_'.e_PAGE);
|
|||||||
$e_sub_cat = 'user_extended';
|
$e_sub_cat = 'user_extended';
|
||||||
|
|
||||||
$curtype = '1';
|
$curtype = '1';
|
||||||
require_once(e_HANDLER.'calendar/calendar_class.php');
|
|
||||||
require_once(e_HANDLER.'message_handler.php');
|
require_once(e_HANDLER.'message_handler.php');
|
||||||
|
|
||||||
$cal = new DHTML_Calendar(true);
|
|
||||||
require_once("auth.php");
|
require_once("auth.php");
|
||||||
require_once(e_HANDLER.'user_extended_class.php');
|
require_once(e_HANDLER.'user_extended_class.php');
|
||||||
require_once(e_HANDLER.'userclass_class.php');
|
require_once(e_HANDLER.'userclass_class.php');
|
||||||
|
|
||||||
require_once(e_HANDLER.'form_handler.php');
|
$frm = e107::getForm();
|
||||||
$frm = new e_form;
|
|
||||||
|
|
||||||
$ue = new e107_user_extended;
|
$ue = new e107_user_extended;
|
||||||
|
|
||||||
@@ -1264,9 +1261,6 @@ function headerjs()
|
|||||||
|
|
||||||
</script>";
|
</script>";
|
||||||
|
|
||||||
global $cal;
|
|
||||||
$text .= $cal->load_files();
|
|
||||||
|
|
||||||
echo $text;
|
echo $text;
|
||||||
}
|
}
|
||||||
?>
|
?>
|
@@ -15,7 +15,8 @@ $(document).ready(function()
|
|||||||
$("input.e-date").each(function() {
|
$("input.e-date").each(function() {
|
||||||
$(this).datepicker({
|
$(this).datepicker({
|
||||||
dateFormat: $(this).attr("data-date-format"),
|
dateFormat: $(this).attr("data-date-format"),
|
||||||
ampm: $(this).attr("data-date-ampm")
|
ampm: $(this).attr("data-date-ampm"),
|
||||||
|
showButtonPanel: true
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -23,7 +24,8 @@ $(document).ready(function()
|
|||||||
$(this).datetimepicker({
|
$(this).datetimepicker({
|
||||||
dateFormat: $(this).attr("data-date-format"),
|
dateFormat: $(this).attr("data-date-format"),
|
||||||
timeFormat: $(this).attr("data-time-format"),
|
timeFormat: $(this).attr("data-time-format"),
|
||||||
ampm: $(this).attr("data-date-ampm")
|
ampm: $(this).attr("data-date-ampm"),
|
||||||
|
showButtonPanel: true
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@@ -1,159 +0,0 @@
|
|||||||
window.defaultStatus = "";
|
|
||||||
|
|
||||||
//get reference object for popup
|
|
||||||
function getRefToDivMod( divID, oDoc ) {
|
|
||||||
if( !oDoc ) { oDoc = document; }
|
|
||||||
if( document.layers ) {
|
|
||||||
if( oDoc.layers[divID] ) { return oDoc.layers[divID]; } else {
|
|
||||||
for( var x = 0, y; !y && x < oDoc.layers.length; x++ ) {
|
|
||||||
y = getRefToDivMod(divID,oDoc.layers[x].document);
|
|
||||||
}
|
|
||||||
return y;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if( document.getElementById ) { return oDoc.getElementById(divID); }
|
|
||||||
if( document.all ) { return oDoc.all[divID]; }
|
|
||||||
return document[divID];
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
//resize method for popup window (resize to fit contents)
|
|
||||||
function resizeWinTo() {
|
|
||||||
if( !document.images.length ) { document.images[0] = document.layers[0].images[0]; }
|
|
||||||
if( !document.images[0].height || window.doneAlready ) { return false; } //in case images are disabled
|
|
||||||
var oH = getRefToDivMod( 'myID' ); if( !oH ) { return false; }
|
|
||||||
var oW = oH.clip ? oH.clip.width : oH.offsetWidth;
|
|
||||||
var oH = oH.clip ? oH.clip.height : oH.offsetHeight; if( !oH ) { return false; }
|
|
||||||
if( !oH || window.doneAlready ) { return false; } //in case images are disabled
|
|
||||||
window.doneAlready = true; //for Safari and Opera
|
|
||||||
/*//no idea why this is in here
|
|
||||||
if(document.getElementsByTagName) {
|
|
||||||
for( var l = document.getElementsByTagName(\'a\'), x = 0; l[x]; x++ ) {
|
|
||||||
if(l[x].className==\'makeright\'&&!l[x].style.position){
|
|
||||||
l[x].style.position=\'relative\';
|
|
||||||
l[x].style.left=(document.images[0].width-(l[x].offsetWidth+l[x].offsetLeft))+\'px\';
|
|
||||||
}}}
|
|
||||||
*/
|
|
||||||
var x = window; x.resizeTo( oW + 200, oH + 200 );
|
|
||||||
var myW = 0, myH = 0, d = x.document.documentElement, b = x.document.body;
|
|
||||||
if( x.innerWidth ) { myW = x.innerWidth; myH = x.innerHeight; }
|
|
||||||
else if( d && d.clientWidth ) { myW = d.clientWidth; myH = d.clientHeight; }
|
|
||||||
else if( b && b.clientWidth ) { myW = b.clientWidth; myH = b.clientHeight; }
|
|
||||||
if( window.opera && !document.childNodes ) { myW += 16; }
|
|
||||||
x.resizeTo( oW = oW + ( ( oW + 200 ) - myW ), oH = oH + ( (oH + 200 ) - myH ) );
|
|
||||||
//three lines to center the popup on the screen
|
|
||||||
//'var scW = screen.availWidth ? screen.availWidth : screen.width;
|
|
||||||
//'var scH = screen.availHeight ? screen.availHeight : screen.height;
|
|
||||||
//'if( !window.opera ) { x.moveTo(Math.round((scW-oW)/2),Math.round((scH-oH)/2)); }
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
//open popup with image and text
|
|
||||||
function openPerfectPopup(oSrc, oWidth, oTitle, oText){
|
|
||||||
|
|
||||||
//the first two should be small for Opera's sake
|
|
||||||
PositionX = 20;
|
|
||||||
PositionY = 20;
|
|
||||||
defaultWidth = 600;
|
|
||||||
defaultHeight = 400;
|
|
||||||
var AutoClose = '';
|
|
||||||
var oW1 = oWidth+30;
|
|
||||||
var oContent
|
|
||||||
|
|
||||||
var buttonclose = "<input class='button' type='button' value='close' onClick='window.close();' />";
|
|
||||||
|
|
||||||
oContent = "<table border='0' cellspacing='10' cellpadding='0' style='text-align:center; width:"+oWidth+"px; height:100px;'>\n";
|
|
||||||
oContent += "<tr><td style='white-space:nowrap; width:"+oWidth+"px;'>";
|
|
||||||
oContent += "<img src='"+oSrc+"' alt='' style='width:"+oWidth+"px;' />";
|
|
||||||
oContent += "</td></tr>\n";
|
|
||||||
oContent += "<tr><td class='poptext' style='width:"+oWidth+"px; text-align:left;'>"+oText+"</td></tr>\n";
|
|
||||||
oContent += "<tr><td colspan='2' style='white-space:nowrap; width:"+oWidth+"px; text-align:right;'>"+buttonclose+"</td></tr>\n";
|
|
||||||
oContent += "</table>\n";
|
|
||||||
|
|
||||||
var imgWin = window.open('','name','scrollbars=no,resizable=1,width='+defaultWidth+',height='+defaultHeight+',left='+PositionX+',top='+PositionY);
|
|
||||||
if( !imgWin ) { return true; } //popup blockers should not cause errors
|
|
||||||
imgWin.document.write('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"><html>\n'+
|
|
||||||
'<head>\n'+
|
|
||||||
'<title>'+oTitle+'<\/title>\n'+
|
|
||||||
'<script type="text/javaScript">\n'+
|
|
||||||
'//get reference object for popup\n'+
|
|
||||||
'function getRefToDivMod( divID, oDoc ) {\n'+
|
|
||||||
' if( !oDoc ) { oDoc = document; }\n'+
|
|
||||||
' if( document.layers ) {\n'+
|
|
||||||
' if( oDoc.layers[divID] ) { return oDoc.layers[divID]; } else {\n'+
|
|
||||||
' for( var x = 0, y; !y && x < oDoc.layers.length; x++ ) {\n'+
|
|
||||||
' y = getRefToDivMod(divID,oDoc.layers[x].document);\n'+
|
|
||||||
' }\n'+
|
|
||||||
' return y;\n'+
|
|
||||||
' }\n'+
|
|
||||||
' }\n'+
|
|
||||||
' if( document.getElementById ) { return oDoc.getElementById(divID); }\n'+
|
|
||||||
' if( document.all ) { return oDoc.all[divID]; }\n'+
|
|
||||||
' return document[divID];\n'+
|
|
||||||
'}\n'+
|
|
||||||
'\n'+
|
|
||||||
'//resize method for popup window (resize to fit contents)\n'+
|
|
||||||
'function resizeWinTo() {\n'+
|
|
||||||
' if( !document.images.length ) { document.images[0] = document.layers[0].images[0]; }\n'+
|
|
||||||
' if( !document.images[0].height || window.doneAlready ) { return; } //in case images are disabled\n'+
|
|
||||||
' var oH = getRefToDivMod( "myID" ); if( !oH ) { return false; }\n'+
|
|
||||||
' var oW = oH.clip ? oH.clip.width : oH.offsetWidth;\n'+
|
|
||||||
' var oH = oH.clip ? oH.clip.height : oH.offsetHeight; if( !oH ) { return false; }\n'+
|
|
||||||
' if( !oH || window.doneAlready ) { return; } //in case images are disabled\n'+
|
|
||||||
' window.doneAlready = true; //for Safari and Opera\n'+
|
|
||||||
' var x = window; x.resizeTo( oW + 200, oH + 200 );\n'+
|
|
||||||
' var myW = 0, myH = 0, d = x.document.documentElement, b = x.document.body;\n'+
|
|
||||||
' if( x.innerWidth ) { myW = x.innerWidth; myH = x.innerHeight; }\n'+
|
|
||||||
' else if( d && d.clientWidth ) { myW = d.clientWidth; myH = d.clientHeight; }\n'+
|
|
||||||
' else if( b && b.clientWidth ) { myW = b.clientWidth; myH = b.clientHeight; }\n'+
|
|
||||||
' if( window.opera && !document.childNodes ) { myW += 16; }\n'+
|
|
||||||
' x.resizeTo( oW = oW + ( ( oW + 200 ) - myW ), oH = oH + ( (oH + 200 ) - myH ) );\n'+
|
|
||||||
'}\n'+
|
|
||||||
'<\/script>\n'+
|
|
||||||
'<style type="text/css">\n'+
|
|
||||||
'html,body{\n'+
|
|
||||||
' text-align:center;\n'+
|
|
||||||
' font-family: arial, verdana, helvetica, tahoma, sans-serif;\n'+
|
|
||||||
' font-size: 11px;\n'+
|
|
||||||
' color: #444;\n'+
|
|
||||||
' margin-left: auto;\n'+
|
|
||||||
' margin-right: auto; \n'+
|
|
||||||
' margin-top:0px;\n'+
|
|
||||||
' margin-bottom:0px;\n'+
|
|
||||||
' padding: 0px;\n'+
|
|
||||||
' background-color:#FFF;\n'+
|
|
||||||
' height:100%;\n'+
|
|
||||||
' cursor:default;\n'+
|
|
||||||
'}\n'+
|
|
||||||
'.poptext{\n'+
|
|
||||||
' font-size: 11px;\n'+
|
|
||||||
' text-align:left;\n'+
|
|
||||||
' color:#444;\n'+
|
|
||||||
' line-height:140%;\n'+
|
|
||||||
' vertical-align:top;\n'+
|
|
||||||
' text-align:left;\n'+
|
|
||||||
'}\n'+
|
|
||||||
'.button{\n'+
|
|
||||||
' border:1px solid #444;\n'+
|
|
||||||
' color: #444;\n'+
|
|
||||||
' background-color:#FFF;\n'+
|
|
||||||
' font-size: 11px;\n'+
|
|
||||||
' padding:2px;\n'+
|
|
||||||
' cursor:pointer;\n'+
|
|
||||||
' width:50px;\n'+
|
|
||||||
'}\n'+
|
|
||||||
'<\/style>\n'+
|
|
||||||
|
|
||||||
'<\/head>\n'+
|
|
||||||
'<body onload="resizeWinTo();">\n'+
|
|
||||||
(document.layers?('<layer left="0" top="0" id="myID">\n'):('<div style="width:'+oW1+'px; position:absolute;left:0px;top:0px;" id="myID" >\n'))+
|
|
||||||
oContent+
|
|
||||||
(document.layers?'<\/layer>\n':'<\/div>\n')+
|
|
||||||
'<\/body>\n'+
|
|
||||||
'<\/html>\n');
|
|
||||||
|
|
||||||
imgWin.document.close();
|
|
||||||
if( imgWin.focus ) { imgWin.focus(); }
|
|
||||||
return false;
|
|
||||||
}
|
|
@@ -134,7 +134,6 @@ class e107
|
|||||||
*/
|
*/
|
||||||
protected static $_known_handlers = array(
|
protected static $_known_handlers = array(
|
||||||
'ArrayData' => '{e_HANDLER}arraystorage_class.php',
|
'ArrayData' => '{e_HANDLER}arraystorage_class.php',
|
||||||
'DHTML_Calendar' => '{e_HANDLER}calendar/calendar_class.php',
|
|
||||||
'UserHandler' => '{e_HANDLER}user_handler.php',
|
'UserHandler' => '{e_HANDLER}user_handler.php',
|
||||||
'comment' => '{e_HANDLER}comment_class.php',
|
'comment' => '{e_HANDLER}comment_class.php',
|
||||||
'convert' => '{e_HANDLER}date_handler.php',
|
'convert' => '{e_HANDLER}date_handler.php',
|
||||||
|
@@ -339,7 +339,7 @@ class e_form
|
|||||||
$dateFormat = ($options['dateformat']) ? trim($options['dateformat']) :e107::getPref('inputdate', '%Y-%m-%d');
|
$dateFormat = ($options['dateformat']) ? trim($options['dateformat']) :e107::getPref('inputdate', '%Y-%m-%d');
|
||||||
$timeFormat = ($options['timeformat']) ? trim($options['timeformat']) :e107::getPref('inputtime', '%H:%M:%S');
|
$timeFormat = ($options['timeformat']) ? trim($options['timeformat']) :e107::getPref('inputtime', '%H:%M:%S');
|
||||||
|
|
||||||
$type = ($options['type']) ? trim($options['type']) : "date";
|
$type = ($options['type']) ? trim($options['type']) : "date"; // 'datetime'
|
||||||
|
|
||||||
// echo "TYPE=".$type;
|
// echo "TYPE=".$type;
|
||||||
|
|
||||||
@@ -398,7 +398,7 @@ class e_form
|
|||||||
|
|
||||||
$text = "";
|
$text = "";
|
||||||
|
|
||||||
$class = (isset($classes[$type])) ? $classes[$type] : "e-date";
|
$class = (isset($classes[$type])) ? $classes[$type] : "tbox e-date";
|
||||||
|
|
||||||
if(vartrue($options['inline']))
|
if(vartrue($options['inline']))
|
||||||
{
|
{
|
||||||
@@ -462,31 +462,6 @@ class e_form
|
|||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// DHTML Calendar is deprecated in 2.0.
|
|
||||||
/*
|
|
||||||
$cal = new DHTML_Calendar(true);
|
|
||||||
$cal_options['showsTime'] = varset($options['time'], true);
|
|
||||||
$cal_options['showOthers'] = varset($options['others'], false);
|
|
||||||
$cal_options['weekNumbers'] = varset($options['weeks'], false);
|
|
||||||
$cal_options['ifFormat'] = e107::getPref('inputdate', '%d/%m/%Y %H:%M:%S');
|
|
||||||
$cal_options['timeFormat'] = "24";
|
|
||||||
|
|
||||||
$cal_attrib['class'] = "tbox date";
|
|
||||||
$cal_attrib['size'] = varset($options['size'], 25);
|
|
||||||
$cal_attrib['name'] = $name;
|
|
||||||
if ($datestamp)
|
|
||||||
{
|
|
||||||
$cal_attrib['value'] = is_numeric($datestamp) ? e107::getDateConvert()->convert_date($datestamp, 'input') : $datestamp; //date("d/m/Y H:i:s", $datestamp);
|
|
||||||
}
|
|
||||||
|
|
||||||
return $cal->make_input_field($cal_options, $cal_attrib);
|
|
||||||
*/
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -1353,7 +1353,16 @@ class mailoutAdminClass extends e107MailManager
|
|||||||
'name' => $calName,
|
'name' => $calName,
|
||||||
'value' => (($calVal == '') ? '' : date($dispString,$calVal))
|
'value' => (($calVal == '') ? '' : date($dispString,$calVal))
|
||||||
);
|
);
|
||||||
return $this->_cal->make_input_field($calOptions, $calAttrib);
|
|
||||||
|
|
||||||
|
list($dformat,$tformat) = explode(" ",$dateString);
|
||||||
|
$options['type'] = 'datetime';
|
||||||
|
$options['dateFormat'] = $dformat;
|
||||||
|
$options['timeFormat'] = $tformat;
|
||||||
|
|
||||||
|
return e107::getForm()->datepicker($calName,$calVal,$options);
|
||||||
|
|
||||||
|
// return $this->_cal->make_input_field($calOptions, $calAttrib);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -1,88 +0,0 @@
|
|||||||
<?php
|
|
||||||
/*
|
|
||||||
* e107 website system
|
|
||||||
*
|
|
||||||
* Copyright (C) 2008-2009 e107 Inc (e107.org)
|
|
||||||
* Released under the terms and conditions of the
|
|
||||||
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
|
|
||||||
*
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* $Source: /cvs_backup/e107_0.8/e107_handlers/popup_handler.php,v $
|
|
||||||
* $Revision$
|
|
||||||
* $Date$
|
|
||||||
* $Author$
|
|
||||||
*/
|
|
||||||
|
|
||||||
if (!defined('e107_INIT')) { exit; }
|
|
||||||
|
|
||||||
class popup{
|
|
||||||
|
|
||||||
// usage:
|
|
||||||
// you need to add the following call to popup.js in a headerjs function
|
|
||||||
//
|
|
||||||
// function headerjs(){
|
|
||||||
// echo "<script type='text/javascript' src='".e_FILE."popup.js'></script>\n";
|
|
||||||
// }
|
|
||||||
// on the page where you want to popup image to appear,
|
|
||||||
// you need to include this class and create a new object for it:
|
|
||||||
// require_once(e_HANDLER."popup_handler.php");
|
|
||||||
// $pp = new popup;
|
|
||||||
// then you need to prepare the right paramater in the function call.
|
|
||||||
// the function returns the image with the popup link as a href on it
|
|
||||||
// clicking the popup will use the js functions in the included js file to popup the image
|
|
||||||
// $pp -> popup($oSrc, $oSrcThumb, $oIconWidth, $oMaxWidth, $oTitle, $oText)
|
|
||||||
|
|
||||||
function popup($image, $thumb, $iconwidth='100', $maxwidth='', $title, $text){
|
|
||||||
global $tp;
|
|
||||||
//$image : full path to the large image you want to popup
|
|
||||||
//$thumb : full path to the small image to show on screen
|
|
||||||
//$maxwidth : the maximum size (width or height) an image may be popup'ed
|
|
||||||
//$title : the window title of the popup
|
|
||||||
//$text : the additional text to add into the popup
|
|
||||||
|
|
||||||
if(file_exists($image)){
|
|
||||||
|
|
||||||
//use $image if $thumb doesn't exist
|
|
||||||
if(!file_exists($thumb)){
|
|
||||||
$thumb = $image;
|
|
||||||
}
|
|
||||||
$imagearray = getimagesize(trim($image));
|
|
||||||
//$imagearray holds width and height parameters of the image
|
|
||||||
//$imagearray[0] is width - $imagearray[1] is height
|
|
||||||
|
|
||||||
if($imagearray[1] > $imagearray[0]){
|
|
||||||
if(isset($maxwidth) && $maxwidth!='' && $imagearray[1] > $maxwidth){
|
|
||||||
$width = round(($maxwidth*$imagearray[0])/$imagearray[1],0);
|
|
||||||
$height = $maxwidth;
|
|
||||||
}else{
|
|
||||||
$width = $imagearray[0];
|
|
||||||
$height = $imagearray[1];
|
|
||||||
}
|
|
||||||
}else{
|
|
||||||
if(isset($maxwidth) && $maxwidth!='' && $imagearray[0] > $maxwidth){
|
|
||||||
$width = $maxwidth;
|
|
||||||
$height = round(($maxwidth*$imagearray[1])/$imagearray[0],0);
|
|
||||||
}else{
|
|
||||||
$width = $imagearray[0];
|
|
||||||
$height = $imagearray[1];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
$iconwidth = ($title == "help" ? "" : ($iconwidth ? "width:".intval($iconwidth)."px;" : "width:100px;") );
|
|
||||||
|
|
||||||
$width = intval($width);
|
|
||||||
$search = array("'", '$', '"', '$',''', '\');
|
|
||||||
$replace = array("\'", '\$', '"', '\$', "\'", '\\');
|
|
||||||
$title = str_replace($search, $replace, $title);
|
|
||||||
$text = str_replace($search, $replace, $text);
|
|
||||||
|
|
||||||
$popup = "<a href='javascript:void(0);' onclick=\"javascript:openPerfectPopup('".$image."',".$width.",'".$title."','".$text."')\" style='cursor:pointer;' onmouseover=\"window.status='".POPUP_LAN_1."'; return true;\" onmouseout=\"window.status=''; return true;\" ><img src='".$thumb."' style='".$iconwidth."' alt='' /></a><br /><br />";
|
|
||||||
|
|
||||||
}else{
|
|
||||||
$popup = "";
|
|
||||||
}
|
|
||||||
return $popup;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
?>
|
|
@@ -694,16 +694,7 @@ class e107_user_extended
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case EUF_DATE : //date
|
case EUF_DATE : //date
|
||||||
return $cal->make_input_field(
|
return e107::getForm()->datepicker($fname,$curval,'dateformat=yy-mm-dd');
|
||||||
array(
|
|
||||||
'ifFormat' => '%Y-%m-%d'
|
|
||||||
),
|
|
||||||
array(
|
|
||||||
'class' => 'tbox',
|
|
||||||
'name' => $fname,
|
|
||||||
'value' => $curval
|
|
||||||
)
|
|
||||||
);
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case EUF_LANGUAGE : // language
|
case EUF_LANGUAGE : // language
|
||||||
|
@@ -33,13 +33,13 @@ require_once(e_HANDLER.'xml_class.php');
|
|||||||
require_once(e_HANDLER."form_handler.php");
|
require_once(e_HANDLER."form_handler.php");
|
||||||
require_once(e_HANDLER."ren_help.php");
|
require_once(e_HANDLER."ren_help.php");
|
||||||
require_once(e_HANDLER."calendar/calendar_class.php");
|
require_once(e_HANDLER."calendar/calendar_class.php");
|
||||||
$cal = new DHTML_Calendar(true);
|
//$cal = new DHTML_Calendar(true);
|
||||||
$gen = new convert();
|
//$gen = new convert();
|
||||||
|
|
||||||
function headerjs()
|
function headerjs()
|
||||||
{
|
{
|
||||||
global $cal;
|
// global $cal;
|
||||||
return $cal->load_files()."<script type='text/javascript' src='".e_FILE_ABS."jslib/core/admin.js'></script>\n";
|
// return $cal->load_files()."<script type='text/javascript' src='".e_FILE_ABS."jslib/core/admin.js'></script>\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
$e_sub_cat = 'download';
|
$e_sub_cat = 'download';
|
||||||
|
@@ -861,18 +861,13 @@ $columnInfo = array(
|
|||||||
if (!$download_datestamp){
|
if (!$download_datestamp){
|
||||||
$download_datestamp = time();
|
$download_datestamp = time();
|
||||||
}
|
}
|
||||||
$cal_options['showsTime'] = false;
|
|
||||||
$cal_options['showOthers'] = false;
|
$text .= $frm->datepicker('download_datestamp',$download_datestamp);
|
||||||
$cal_options['weekNumbers'] = false;
|
|
||||||
$cal_options['ifFormat'] = "%d/%m/%Y %H:%M:%S";
|
// $update_checked = ($_POST['update_datestamp']) ? "checked='checked'" : "";
|
||||||
$cal_options['timeFormat'] = "24";
|
// $text .= " <span><input type='checkbox' value='1' name='update_datestamp' $update_checked/>".DOWLAN_148."</span>";
|
||||||
$cal_attrib['class'] = "tbox";
|
|
||||||
$cal_attrib['size'] = "22";
|
$text .= "
|
||||||
$cal_attrib['name'] = "download_datestamp";
|
|
||||||
$cal_attrib['value'] = date("d/m/Y H:i:s", $download_datestamp);
|
|
||||||
$text .= $cal->make_input_field($cal_options, $cal_attrib);
|
|
||||||
$update_checked = ($_POST['update_datestamp']) ? "checked='checked'" : "";
|
|
||||||
$text .= " <span><input type='checkbox' value='1' name='update_datestamp' $update_checked/>".DOWLAN_148."</span>
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
@@ -1086,27 +1081,20 @@ $columnInfo = array(
|
|||||||
// ------------------------------------------
|
// ------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
$dlInfo['download_description'] = $tp->toDB($_POST['download_description']);
|
$dlInfo['download_description'] = $tp->toDB($_POST['download_description']);
|
||||||
$dlInfo['download_name'] = $tp->toDB($_POST['download_name']);
|
$dlInfo['download_name'] = $tp->toDB($_POST['download_name']);
|
||||||
$dlInfo['download_author'] = $tp->toDB($_POST['download_author']);
|
$dlInfo['download_author'] = $tp->toDB($_POST['download_author']);
|
||||||
$dlInfo['download_author_email'] = $tp->toDB($_POST['download_author_email']);
|
$dlInfo['download_author_email'] = $tp->toDB($_POST['download_author_email']);
|
||||||
$dlInfo['download_author_website'] = $tp->toDB($_POST['download_author_website']);
|
$dlInfo['download_author_website'] = $tp->toDB($_POST['download_author_website']);
|
||||||
$dlInfo['download_category'] = intval($_POST['download_category']);
|
$dlInfo['download_category'] = intval($_POST['download_category']);
|
||||||
$dlInfo['download_active'] = intval($_POST['download_active']);
|
$dlInfo['download_active'] = intval($_POST['download_active']);
|
||||||
$dlInfo['download_thumb'] = $tp->toDB($_POST['download_thumb']);
|
$dlInfo['download_thumb'] = $tp->toDB($_POST['download_thumb']);
|
||||||
$dlInfo['download_image'] = $tp->toDB($_POST['download_image']);
|
$dlInfo['download_image'] = $tp->toDB($_POST['download_image']);
|
||||||
$dlInfo['download_comment'] = $tp->toDB($_POST['download_comment']);
|
$dlInfo['download_comment'] = $tp->toDB($_POST['download_comment']);
|
||||||
$dlInfo['download_class'] = intval($_POST['download_class']);
|
$dlInfo['download_class'] = intval($_POST['download_class']);
|
||||||
$dlInfo['download_visible'] = intval($_POST['download_visible']);
|
$dlInfo['download_visible'] = intval($_POST['download_visible']);
|
||||||
|
$dlInfo['download_datestamp'] = e107::getDate()->convert($_POST['download_datestamp'],'inputdate');
|
||||||
|
|
||||||
if(preg_match("#(.*?)/(.*?)/(.*?) (.*?):(.*?):(.*?)$#", $_POST['download_datestamp'], $matches))
|
|
||||||
{
|
|
||||||
$dlInfo['download_datestamp'] = mktime($matches[4], $matches[5], $matches[6], $matches[2], $matches[1], $matches[3]);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$dlInfo['download_datestamp'] = time();
|
|
||||||
}
|
|
||||||
|
|
||||||
if($_POST['update_datestamp'])
|
if($_POST['update_datestamp'])
|
||||||
{
|
{
|
||||||
|
@@ -59,9 +59,6 @@ require_once (e_HANDLER.'ren_help.php');
|
|||||||
include_once (e107::coreTemplatePath('usersettings')); //correct way to load a core template.
|
include_once (e107::coreTemplatePath('usersettings')); //correct way to load a core template.
|
||||||
include_once (e_CORE.'shortcodes/batch/usersettings_shortcodes.php');
|
include_once (e_CORE.'shortcodes/batch/usersettings_shortcodes.php');
|
||||||
|
|
||||||
require_once (e_HANDLER.'calendar/calendar_class.php');
|
|
||||||
$cal = new DHTML_Calendar(true);
|
|
||||||
|
|
||||||
// include JS, headerjs not called in header anymore
|
// include JS, headerjs not called in header anymore
|
||||||
$js = e107::getJs();
|
$js = e107::getJs();
|
||||||
$js->footerInline(headerjs());
|
$js->footerInline(headerjs());
|
||||||
@@ -748,7 +745,7 @@ function delete_file($fname, $dir = 'avatars/')
|
|||||||
|
|
||||||
function headerjs()
|
function headerjs()
|
||||||
{
|
{
|
||||||
//global $cal;
|
|
||||||
$script = "
|
$script = "
|
||||||
<script type='text/javascript'>
|
<script type='text/javascript'>
|
||||||
function addtext_us(sc)
|
function addtext_us(sc)
|
||||||
@@ -758,7 +755,7 @@ function headerjs()
|
|||||||
</script>
|
</script>
|
||||||
";
|
";
|
||||||
|
|
||||||
//$script .= $cal->load_files();
|
|
||||||
return $script;
|
return $script;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user