Author Topic: question about the "Ablaufdatum"  (Read 7461 times)

0 Members and 1 Guest are viewing this topic.

Offline pcfreak

  • Newbie
  • *
  • Posts: 14
    • View Profile
question about the "Ablaufdatum"
« on: October 14, 2002, 11:58:37 PM »
i have a question

when a user is registerd can het automatic set on in a prived album
the "Ablaufdatum" is standard on "0" selected

is it posible to set it automatic on a  hour or on 2 hours when  a user is logged in ?

Offline pcfreak

  • Newbie
  • *
  • Posts: 14
    • View Profile
question about the "Ablaufdatum"
« Reply #1 on: October 15, 2002, 04:40:15 PM »
Who can help me
?? please

when i want a user give a usergroep acces, then Aktivierungsdatum is set automatic on the system date, but the Ablaufdatum is always 0

How can the ablaufdatum automatic set on example 1 hour, our 1 day later.??

Offline pcfreak

  • Newbie
  • *
  • Posts: 14
    • View Profile
question about the "Ablaufdatum"
« Reply #2 on: October 16, 2002, 01:56:06 PM »
Niemand  :cry:

Offline pcfreak

  • Newbie
  • *
  • Posts: 14
    • View Profile
question about the "Ablaufdatum"
« Reply #3 on: October 16, 2002, 11:28:17 PM »
weist keine ein antword, oder is er keine antword moglich.

sorry, I'm from the netherlands, (meine deutche sprage is bad :oops: )

Offline Jan

  • Administrator
  • 4images Guru
  • *****
  • Posts: 5.024
    • View Profile
    • 4images - Image Gallery Management System
question about the "Ablaufdatum"
« Reply #4 on: October 16, 2002, 11:58:36 PM »
Replace in "admin/usergroups.php"

Code: [Select]
$end_date = 0;
(2 times)
with
Code: [Select]
$time = time()  + 60 * 60 * 24 * 1;
$end_date = date("Y-m-d H:i:s", $time);

Replace 1 with the numberof day or 24 with number of hours.

Jan
Your first three "must do" before you ask a question:
1. Forum rules
2. FAQ
3. Search

Offline pcfreak

  • Newbie
  • *
  • Posts: 14
    • View Profile
question about the "Ablaufdatum"
« Reply #5 on: October 17, 2002, 01:02:22 AM »
It works only once, this works fine ->

REPLACE
Code: [Select]

  if ((!check_admin_date($end_date) && $end_date != 0) || $end_date == "") {
    $end_date = 0;
  }


WITH

Code: [Select]

 if (!check_admin_date($end_date)) {
    $time = time()  + 60 * 60 * 24 * 1;
$end_date = date("Y-m-d H:i:s", $time);
  }



REPLACE


Code: [Select]

 if (isset($usergroup_match_array[$key]['groupmatch_enddate'])) {
        $end_date = ($usergroup_match_array[$key]['groupmatch_enddate'] != 0) ? date("Y-m-d H:i:s", $usergroup_match_array[$key]['groupmatch_enddate']) : $usergroup_match_array[$key]['groupmatch_enddate'];
      }
      else {
        $end_date = 0;
      }
      show_usergroup_row($key, $val, $start_date, $end_date);
    }
  }





WITH

Code: [Select]

      if (isset($usergroup_match_array[$key]['groupmatch_enddate'])) {
        $time = time()  + 60 * 60 * 24 * 1;
$end_date = date("Y-m-d H:i:s", $time);
      }




Thanks Jan for the hint, aobut the time code