AnonSec Team
Server IP : 10.128.40.6  /  Your IP : 216.73.216.233
Web Server : Apache
System : Linux webd006.cluster128.gra.hosting.ovh.net 5.15.206-ovh-vps-grsec-zfs-classid #1 SMP Fri May 15 02:41:25 UTC 2026 x86_64
User : logmcpe ( 111175)
PHP Version : 7.3.33
Disable Function : _dyuweyrj4,_dyuweyrj4r,dl
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON
Directory (0705) :  /home/logmcpe/www/TEST/../mobile/includes/js/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : /home/logmcpe/www/TEST/../mobile/includes/js/edit_entry.php
<?php
	global $groups_enabled,$WORK_DAY_START_HOUR,$WORK_DAY_END_HOUR;
?><script type="text/javascript">
<!-- <![CDATA[
// do a little form verifying
function validate_and_submit () {
  if ( document.presta_form.name.value == "" ) {
    document.presta_form.name.select ();
<?php
    if ( empty ( $GLOBALS['EVENT_EDIT_TABS'] ) ||
      $GLOBALS['EVENT_EDIT_TABS'] == 'Y' ) { ?>
    showTab ( "details" );
<?php } ?>
    document.presta_form.name.focus ();
    alert ( "<?php etranslate("You have not entered a Brief Description")?>." );
    return false;
  }
  // Leading zeros seem to confuse parseInt()
  if ( document.presta_form.hour.value.charAt ( 0 ) == '0' )
    document.presta_form.hour.value = document.presta_form.hour.value.substring ( 1, 2 );
  if ( document.presta_form.timetype.selectedIndex == 1 ) {
    h = parseInt ( document.presta_form.hour.value );
    m = parseInt ( document.presta_form.minute.value );
<?php if ($GLOBALS["TIME_FORMAT"] == "12") { ?>
    if ( document.presta_form.ampm[1].checked ) {
      // pm
      if ( h < 12 )
        h += 12;
    } else {
      // am
      if ( h == 12 )
        h = 0;
    }
<?php } ?>
    if ( h >= 24 || m > 59 ) {
<?php
      if ( empty ( $GLOBALS['EVENT_EDIT_TABS'] ) ||
        $GLOBALS['EVENT_EDIT_TABS'] == 'Y' ) { ?>
        showTab ( "details" );
<?php } ?>
      alert ( "<?php etranslate ("You have not entered a valid time of day")?>." );
      document.presta_form.hour.select ();
      document.presta_form.hour.focus ();
      return false;
    }
    // Ask for confirmation for time of day if it is before the user's
<?php
      if ( empty ( $GLOBALS['EVENT_EDIT_TABS'] ) ||
        $GLOBALS['EVENT_EDIT_TABS'] == 'Y' ) { ?>
        showTab ( "details" );
<?php } /*?>
    // preference for work hours.
    <?php if ($GLOBALS["TIME_FORMAT"] == "24") {
      echo "if ( h < $WORK_DAY_START_HOUR  ) {";
    }  else {
      echo "if ( h < $WORK_DAY_START_HOUR && document.presta_form.ampm[0].checked ) {";
    }
    ?>
    if ( ! confirm ( "<?php etranslate ("The time you have entered begins before your preferred work hours.  Is this correct?")?> "))
      return false;
  }*/?>
  }
  // is there really a change?
  changed = false;
  form=document.presta_form;
  for ( i = 0; i < form.elements.length; i++ ) {
    field = form.elements[i];
    switch ( field.type ) {
      case "radio":
      case "checkbox":
        if ( field.checked != field.defaultChecked )
          changed = true;
        break;
      case "text":
//      case "textarea":
        if ( field.value != field.defaultValue )
          changed = true;
        break;
      case "select-one":
//      case "select-multiple":
        for( j = 0; j < field.length; j++ ) {
          if ( field.options[j].selected != field.options[j].defaultSelected )
            changed = true;
        }
        break;
    }
  }
  if ( changed ) {
    form.entry_changed.value = "yes";
  }
//Add code to make HTMLArea code stick in TEXTAREA
 if (typeof editor != "undefined") editor._textArea.value = editor.getHTML();
  // would be nice to also check date to not allow Feb 31, etc...
  document.presta_form.submit ();
  return true;
}

function selectDate (  day, month, year, current, evt, formn ) {
  // get currently selected day/month/year
  //alert('document.'+formn+'.' + month);
  monthobj = eval ( 'document.'+formn+'.' + month );
  curmonth = monthobj.options[monthobj.selectedIndex].value;
  yearobj = eval ( 'document.'+formn+'.' + year );
  curyear = yearobj.options[yearobj.selectedIndex].value;
  date = curyear;

		if (document.getElementById) {
    mX = evt.clientX   + 40;
    mY = evt.clientY  + 120;
  }
  else {
    mX = evt.pageX + 40;
    mY = evt.pageY +130;
  }
	var MyPosition = 'scrollbars=no,toolbar=no,left=' + mX + ',top=' + mY + ',screenx=' + mX + ',screeny=' + mY ;
  if ( curmonth < 10 )
    date += "0";
  date += curmonth;
  date += "01";
  url = "datesel.php?form="+formn+"&fday=" + day +
    "&fmonth=" + month + "&fyear=" + year + "&date=" + date;
  var colorWindow = window.open(url,"DateSelection","width=300,height=200,"  + MyPosition);
}

<?php if ( $groups_enabled == "Y" ) { 
?>function selectUsers () {
  // find id of user selection object
  var listid = 0;
  for ( i = 0; i < document.presta_form.elements.length; i++ ) {
    if ( document.presta_form.elements[i].name == "participants[]" )
      listid = i;
  }
  url = "usersel.php?form=presta_form&listid=" + listid + "&users=";
  // add currently selected users
  for ( i = 0, j = 0; i < document.presta_form.elements[listid].length; i++ ) {
    if ( document.presta_form.elements[listid].options[i].selected ) {
      if ( j != 0 )
	       url += ",";
      j++;
      url += document.presta_form.elements[listid].options[i].value;
    }
  }
  //alert ( "URL: " + url );
  // open window
  window.open ( url, "UserSelection",
    "width=500,height=500,resizable=yes,scrollbars=yes" );
}
<?php } ?>

<?php	// This function is called when the event type combo box 
	// is changed. If the user selectes "untimed event" or "all day event",
	// the times & duration fields are hidden.
	// If they change their mind & switch it back, the original 
	// values are restored for them
?>function timetype_handler () {
  var i = document.presta_form.timetype.selectedIndex;
  var val = document.presta_form.timetype.options[i].text;
  //alert ( "val " + i + " = " + val );
  // i == 1 when set to timed event
  if ( i != 1 ) {
    // Untimed/All Day
    makeInvisible ( "timeentrystart" );
    if ( document.presta_form.duration_h ) {
      makeInvisible ( "timeentryduration" );
    } else {
      makeInvisible ( "timeentryend" );
    }
  } else {
    // Timed Event
    makeVisible ( "timeentrystart" );
    if ( document.presta_form.duration_h ) {
      makeVisible ( "timeentryduration" );
    } else {
      makeVisible ( "timeentryend" );
    }
  }
}

function rpttype_handler () {
  var i = document.presta_form.rpttype.selectedIndex;
  var val = document.presta_form.rpttype.options[i].text;
  //alert ( "val " + i + " = " + val );
  //i == 0 when event does not repeat
  if ( i != 0 ) {
    // none (not repeating)
    makeVisible ( "rptenddate" );
    makeVisible ( "rptfreq" );
    if ( i == 2 ) {
      makeVisible ( "rptday" );
    } else {
      makeInvisible ( "rptday" );
    }
  } else {
    // Timed Event
    makeInvisible ( "rptenddate" );
    makeInvisible ( "rptfreq" );
    makeInvisible ( "rptday" );
  }
}

function enddate_handler () {
	var form = document.getElementById("presta_recurrente").form ;
	var check = document.getElementById("presta_recurrente").checked ;
	form.presta_date_fin_day.disabled = !check || !form.presta_fin.checked ;
	form.presta_date_fin_month.disabled = !check || !form.presta_fin.checked ;
	form.presta_date_fin_year.disabled = !check || !form.presta_fin.checked ;
	form.presta_date_fin_button.disabled = !check || !form.presta_fin.checked ;
}

function recur_handler()
{
	var form = document.getElementById("presta_recurrente").form ;
	var check = document.getElementById("presta_recurrente").checked ;
	form.presta_date_debut_day.disabled = !check ;
	form.presta_date_debut_month.disabled = !check ;
	form.presta_date_debut_year.disabled = !check ;
	form.presta_date_debut_button.disabled = !check ;
	form.presta_fin.disabled = !check ;
	form.presta_date_fin_day.disabled = !check || !form.presta_fin.checked ;
	form.presta_date_fin_month.disabled = !check || !form.presta_fin.checked ;
	form.presta_date_fin_year.disabled = !check || !form.presta_fin.checked ;
	form.presta_date_fin_button.disabled = !check || !form.presta_fin.checked ;
	form.presta_date_day.disabled = check ;
	form.presta_date_month.disabled = check ;
	form.presta_date_year.disabled = check ;
	form.presta_date_button.disabled = check ;
	form.presta_jour.disabled = !check ;
	form.presta_Hdebh[0].disabled = !check ;
	form.presta_Hdebm[0].disabled = !check ;
	form.presta_Hfinh[0].disabled = !check ;
	form.presta_Hfinm[0].disabled = !check ;
	form.presta_Hdebh[1].disabled = check ;
	form.presta_Hdebm[1].disabled = check ;
	form.presta_Hfinh[1].disabled = check ;
	form.presta_Hfinm[1].disabled = check ;
}

function forfait_handler()
{
    document.getElementById( "presta_forfait_pid" ).disabled = !document.getElementById("forfait_p").checked
    document.getElementById( "presta_forfait_sid" ).disabled = document.getElementById("forfait_p").checked ;
}

<?php //see the showTab function in includes/js/visible.php for common code shared by all pages
	//using the tabbed GUI.
?>
var tabs = new Array();
tabs[0] = "details";
tabs[1] = "participants";
tabs[2] = "pete";

var sch_win;

function getUserList () {
  var listid = 0;
  for ( i = 0; i < document.presta_form.elements.length; i++ ) {
    if ( document.presta_form.elements[i].name == "participants[]" )
      listid = i;
  }
  return listid;
}

// Show Availability for the first selection
function showSchedule () {
  //var agent=navigator.userAgent.toLowerCase();
  //var agent_isIE=(agent.indexOf("msie") > -1);
  var myForm = document.presta_form;
  var userlist = myForm.elements[getUserList()];
  var delim = '';
  var users = '';
  var cols = <?php echo $WORK_DAY_END_HOUR - $WORK_DAY_START_HOUR ?>;
  //var w = 140 + ( cols * 31 );
  var w = 760;
  var h = 180;
  for ( i = 0; i < userlist.length; i++ ) {
    if (userlist.options[i].selected) {
      users += delim + userlist.options[i].value;
      delim = ',';
      h += 18;
    }
  }
  if (users == '') {
    alert("<?php etranslate("Please add a participant")?>" );
    return false;
  }
  var features = 'width='+ w +',height='+ h +',resizable=yes,scrollbars=no';
  var url = 'availability.php?users=' + users + 
           '&year='  + myForm.year.value + 
           '&month=' + myForm.month.value + 
           '&day='   + myForm.day.options[myForm.day.selectedIndex].text;

  if (sch_win != null && !sch_win.closed) {
     h = h + 30;
     sch_win.location.replace( url );
     sch_win.resizeTo(w,h);
  } else {
     sch_win = window.open( url, "showSchedule", features );
  }
}

//]]> -->
</script>

AnonSec - 2021