Ejemplo n.º 1
0
     } else {
         if ($notification->itemtype == "batchuser") {
             $object = BatchUser::get_by_id($notification->itemid);
             $batch = Batch::get_by_id($object->batchid);
             $school = School::get_by_id($object->schoolid);
             $html .= "Now a member in Batch <a href='batch.php?id=" . $batch->id . "'>" . $batch->get_batchyear() . "</a> of School <a href='school.php?id=" . $school->id . "'>" . $school->name . "</a>";
         } else {
             if ($notification->itemtype == "sectionuser") {
                 $object = SectionUser::get_by_id($notification->itemid);
                 $section = Section::get_by_id($object->sectionid);
                 $batch = Batch::get_by_id($object->batchid);
                 $school = School::get_by_id($object->schoolid);
                 $html .= "Now a member in Section <a href='section.php?id=" . $section->id . "'>" . $section->name . "</a> of Batch <a href='batch.php?id=" . $batch->id . "'>" . $batch->get_batchyear() . "</a> of School <a href='school.php?id=" . $school->id . "'>" . $school->name . "</a>";
             } else {
                 if ($notification->itemtype == "clubuser") {
                     $object = ClubUser::get_by_id($notification->itemid);
                     $club = Club::get_by_id($object->clubid);
                     $school = School::get_by_id($object->schoolid);
                     $html .= "Now a member in Club <a href='club.php?id=" . $club->id . "'>" . $club->name . "</a> of School <a href='school.php?id=" . $school->id . "'>" . $school->name . "</a>";
                 } else {
                     if ($notification->itemtype == "groupuser") {
                         $object = GroupUser::get_by_id($notification->itemid);
                         $group = Group::get_by_id($object->groupid);
                         $school = School::get_by_id($object->schoolid);
                         $html .= "Now a member in Group <a href='group.php?id=" . $group->id . "'>" . $group->name . "</a> of School <a href='school.php?id=" . $school->id . "'>" . $school->name . "</a>";
                     }
                 }
             }
         }
     }
 }
Ejemplo n.º 2
0
     $object->pending = 0;
     $object->update();
     $notification->title = "message";
     $notification->itemid = $itemid;
     $notification->itemtype = "batchuser";
 } else {
     if ($itemtype == "sectionuser") {
         $object = SectionUser::get_by_id($itemid);
         $object->pending = 0;
         $object->update();
         $notification->title = "message";
         $notification->itemid = $itemid;
         $notification->itemtype = "sectionuser";
     } else {
         if ($itemtype == "clubuser") {
             $object = ClubUser::get_by_id($itemid);
             $object->pending = 0;
             $object->update();
             $notification->title = "message";
             $notification->itemid = $itemid;
             $notification->itemtype = "clubuser";
         } else {
             if ($itemtype == "groupuser") {
                 $object = GroupUser::get_by_id($itemid);
                 $object->pending = 0;
                 $object->update();
                 $notification->title = "message";
                 $notification->itemid = $itemid;
                 $notification->itemtype = "groupuser";
             }
         }