mirror of
https://gitlab.com/t6353/sharee.bike.git
synced 2025-05-11 06:17:27 +02:00
example configuration
This commit is contained in:
parent
dc2b4f7086
commit
64991348da
23 changed files with 563 additions and 189 deletions
|
@ -310,6 +310,7 @@ sub handler {
|
|||
#permissions
|
||||
#DMS Kunden rw
|
||||
if($R::base_edit && $node_meta->{ct_table} eq "contentadr"){
|
||||
$bw->log("DMS action from $users_dms->{u_id} on $node_meta->{ct_table}|$R::c_id with: $R::base_edit","","");
|
||||
if($R::c_id && $R::base_edit eq "remove_chk4rel"){
|
||||
my $delete_key = "delete_content";
|
||||
$delete_key = "delete_adr";
|
||||
|
@ -325,6 +326,7 @@ sub handler {
|
|||
|
||||
#DMS users accounts
|
||||
if($R::base_edit && $node_meta->{ct_table} eq "users"){#DMS-Account rw
|
||||
$bw->log("DMS action from $users_dms->{u_id} on $node_meta->{ct_table} with: $R::base_edit","","");
|
||||
if($R::u_id && $R::base_edit eq "remove_chk4rel"){#users
|
||||
my $delete_key = "delete_dmsusers";
|
||||
$return = "failure::Datensatz wirklich löschen. ::?base_edit=$delete_key\&exit_box2=1\&u_id=$R::u_id ::löschen";
|
||||
|
@ -339,6 +341,7 @@ sub handler {
|
|||
|
||||
#DMS Waren || Einstellung/Service* rw
|
||||
if($node_meta->{ct_table} eq "content" || $node_meta->{ct_table} eq "contentuser"){
|
||||
$bw->log("DMS action from $users_dms->{u_id} on $node_meta->{ct_table}|$R::main_id with: $R::rel_edit","","");
|
||||
if(($node_meta->{ct_table} eq "content" && $users_dms->{int01} == 2) || ($node_meta->{ct_table} eq "contentuser" && $users_dms->{int08} == 2)){
|
||||
if($R::rel_edit eq "save_relation" && $R::main_id && $R::main_id >= 200000){
|
||||
$return = $pl->save_relation($R::main_id,$users_dms->{u_id});
|
||||
|
@ -346,7 +349,7 @@ sub handler {
|
|||
$return = $pl->delete_relation($R::main_id,$users_dms->{u_id});
|
||||
}elsif($R::rel_edit eq "new_relation" && $R::main_id && $R::main_id >= 200000){
|
||||
$return = $pl->new_relation($R::main_id,$users_dms->{u_id});
|
||||
}else{
|
||||
}elsif($R::rel_edit && $R::main_id && $R::main_id >= 200000){
|
||||
$return = $pm->maininit($users_dms);
|
||||
}
|
||||
}elsif($R::rel_edit){
|
||||
|
@ -356,6 +359,7 @@ sub handler {
|
|||
|
||||
#DMS Faktura
|
||||
if($node_meta->{ct_table} eq "contenttrans"){
|
||||
$bw->log("DMS action from $users_dms->{u_id} on $node_meta->{ct_table}|$R::c_id4trans,$R::tpl_id4trans,$R::kind_of_trans with: $R::ct_trans","","");
|
||||
if($users_dms->{int03} == 1 && $R::ct_trans eq "open"){#DMS Faktura read
|
||||
$db->update_users4trans($R::c_id4trans,$R::tpl_id4trans,$R::kind_of_trans,$users_dms->{u_id}) if($R::c_id4trans && $R::tpl_id4trans);
|
||||
}elsif($users_dms->{int03} == 2){#DMS Faktura rw
|
||||
|
|
|
@ -78,6 +78,14 @@ sub kmlGenerator {
|
|||
$project = $dbt->{website}->{$varenv->{syshost}}->{project} if($dbt->{website}->{$varenv->{syshost}}->{project});
|
||||
$project = $dbt->{operator}->{$varenv->{dbname}}->{project} if($dbt->{operator}->{$varenv->{dbname}}->{project});
|
||||
#print "$project | $varenv->{syshost} | $users_sharee->{c_id} | $authcookie->{authcookie}";
|
||||
my $icon_green = "Open_Green.png";
|
||||
my $icon_red = "Open_Red.png";
|
||||
my $icon_blue = "Open_Blue.png";
|
||||
if($project eq "Bayern"){
|
||||
$icon_green = "LastenradBay_Standortpfeil_gruen_03a.png";
|
||||
$icon_red = "LastenradBay_Standortpfeil_rot_03a.png";
|
||||
$icon_blue = "LastenradBay_Standortpfeil_blau_03a.png";
|
||||
}
|
||||
|
||||
my $timestamp = strftime "%Y%m%d%H%M%S", localtime;
|
||||
my $kmlfile = "sharee-$timestamp-$users_sharee->{c_id}.kml";
|
||||
|
@ -122,7 +130,7 @@ sub kmlGenerator {
|
|||
foreach my $station (keys (%{ $response_stations->{shareejson}->{stations} })) {
|
||||
$station_hash->{$station} = $response_stations->{shareejson}->{stations}->{$station};
|
||||
|
||||
$place_pin{$station} = "Open_Red.png";
|
||||
$place_pin{$station} = $icon_red;
|
||||
my $station_desc = "Mietradstation $station";
|
||||
if($response_stations->{shareejson}->{stations}->{$station}->{description}){
|
||||
$station_desc = "Mietradstation: $response_stations->{shareejson}->{stations}->{$station}->{description} $station";
|
||||
|
@ -156,19 +164,19 @@ sub kmlGenerator {
|
|||
|
||||
#if Lastenrad
|
||||
if($station_groupID == $lastenrad && $station_groupID == $bike_groupID && $station eq $response_bikes->{shareejson}->{bikes}->{$bike}->{station}){
|
||||
$place_pin{$station} = "Open_Green.png";
|
||||
$place_pin{$station} = $icon_green;
|
||||
$place_desc{$station} .= "<p align='left'>• Lastenrad vorrätig: $response_bikes->{shareejson}->{bikes}->{$bike}->{description} $bike</p>";
|
||||
#print "($station) Lastenrad $bike\n";
|
||||
}
|
||||
#if E-Lastenrad
|
||||
if($station_groupID == $e_lastenrad && $station_groupID == $bike_groupID && $station eq $response_bikes->{shareejson}->{bikes}->{$bike}->{station}){
|
||||
$place_pin{$station} = "Open_Green.png";
|
||||
$place_pin{$station} = $icon_green;
|
||||
$place_desc{$station} .= "<p align='left'>• E-Lastenrad vorrätig: $response_bikes->{shareejson}->{bikes}->{$bike}->{description} $bike</p>";
|
||||
#print "($station) E-Lastenrad $bike\n";
|
||||
}
|
||||
#if Stadtrad
|
||||
if($station_groupID == $stadtrad && $station_groupID == $bike_groupID && $station eq $response_bikes->{shareejson}->{bikes}->{$bike}->{station}){
|
||||
$place_pin{$station} = "Open_Green.png";
|
||||
$place_pin{$station} = $icon_green;
|
||||
$place_desc{$station} .= "<p align='left'>• Stadtrad vorrätig: $response_bikes->{shareejson}->{bikes}->{$bike}->{description} $bike</p>";
|
||||
#print "($station) Stadtrad $bike\n";
|
||||
}
|
||||
|
|
|
@ -120,6 +120,14 @@ sub admin_tpl(){
|
|||
|
||||
#content container
|
||||
print "<div id='Container_cms'>$superu_id";
|
||||
|
||||
print $q->hidden(-name=>'last_node_name', -value=>"$node_meta->{node_name}");
|
||||
print $q->hidden(-name=>'owner', -value=>"$users_dms->{u_id}");
|
||||
print $q->hidden(-name=>'parent_id', -value=>"$node_meta->{parent_id}");
|
||||
print $q->hidden(-name=>'main_id', -value=>"$node_meta->{main_id}");
|
||||
print $q->hidden(-name=>'template_id', -value=>"$node_meta->{template_id}");
|
||||
print $q->hidden(-name=>'mode', -value=>"admin");
|
||||
|
||||
print $q->start_table({-style=>'margin-top:6px;', -border=>'0', -width=>'100%', -align=>'left', -cellpadding=>'3', -cellspacing=>'3'});
|
||||
print $q->Tr();
|
||||
if(1==1){
|
||||
|
@ -137,13 +145,6 @@ sub admin_tpl(){
|
|||
print $q->span({-style=>'margin-left:5em; font-size:0.91em;'}, "$u_name / $change") if($u_name);
|
||||
print "</td>\n";
|
||||
|
||||
print $q->hidden(-name=>'last_node_name', -value=>"$node_meta->{node_name}");
|
||||
print $q->hidden(-name=>'owner', -value=>"$users_dms->{u_id}");
|
||||
print $q->hidden(-name=>'parent_id', -value=>"$node_meta->{parent_id}");
|
||||
print $q->hidden(-name=>'main_id', -value=>"$node_meta->{main_id}");
|
||||
print $q->hidden(-name=>'mode', -value=>"admin");
|
||||
|
||||
|
||||
print $q->Tr();
|
||||
print $q->td({-colspan=>'2',-style=>'padding:5px;font-style:italic;'},"Path: $path");
|
||||
foreach (@tpl_order){
|
||||
|
|
|
@ -233,8 +233,8 @@ sub delete_relation {
|
|||
|
||||
|
||||
my $collect_rows=0;
|
||||
if($R::template_id eq "205"){
|
||||
(my $collect_node,$collect_rows) = $dbt->collect_noderel($dbh,$noderel->{parent_id},$R::template_id);
|
||||
if($noderel->{template_id} == 205){
|
||||
(my $collect_node,$collect_rows) = $dbt->collect_noderel($dbh,$noderel->{parent_id},$noderel->{template_id});
|
||||
}
|
||||
my $subrelnode = $dbt->get_subrelnode($dbh,$main_id,"","");
|
||||
|
||||
|
@ -242,6 +242,7 @@ sub delete_relation {
|
|||
my $deleteable_subnode = 1;
|
||||
my $deleteable_node = 1;
|
||||
my $deleteable_last_node = 1;
|
||||
#TODO, $subrelnode->{template_id} must be unique in Flotte context
|
||||
if($subrelnode->{template_id} >= 400 && $subrelnode->{template_id} <= 499){
|
||||
$deleteable_subnode = 1;
|
||||
if($collect_rows <= 1){
|
||||
|
@ -254,7 +255,9 @@ sub delete_relation {
|
|||
if($ct_record->{c_id} > 0){
|
||||
$deleteable_node = 0;
|
||||
}
|
||||
print FILE "$deleteable_subnode == 0 || $deleteable_node == 0 --> collect_rows: $collect_rows|c_id: $ct_record->{c_id}\n" if($debug);
|
||||
#print "$deleteable_subnode|$deleteable_node|$deleteable_last_node|$collect_rows";
|
||||
|
||||
print FILE "deleteable_subnode:$deleteable_subnode | deleteable_node:$deleteable_node | deleteable_last_node:$deleteable_last_node --> collect_rows: $collect_rows|c_id: $ct_record->{c_id}\n" if($debug);
|
||||
|
||||
if($deleteable_last_node == 0){
|
||||
$ret = "failure::Abbruch, es muss mindestens eine Mietrad Flotte definiert sein. ($collect_rows on $noderel->{parent_id})";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue