mirror of
https://gitlab.com/t6353/sharee.bike.git
synced 2025-05-13 23:26:29 +02:00
adding REN and SX operators
This commit is contained in:
parent
709521c892
commit
30bb566d5e
8 changed files with 45 additions and 29 deletions
|
@ -550,7 +550,7 @@ sub service_update(){
|
|||
};
|
||||
my $record_pos = $dbt->fetch_tablerecord($dbh,$pref_pos) if($c_id);
|
||||
if($record_pos->{txt01} ne "NaN"){
|
||||
$update->{$key} = $q->escapeHTML($q->param('work_val')) . " " . $record_pos->{txt01};
|
||||
$update->{$key} = $q->escapeHTML($q->param('work_val')) . " " . $record_pos->{txt01} if($record_pos->{txt01} !~ /::erledigt::/);
|
||||
}else{
|
||||
$update->{$key} = $q->escapeHTML($q->param('work_val'));
|
||||
}
|
||||
|
@ -779,6 +779,7 @@ sub booking_update(){
|
|||
my $owner = shift || 0;
|
||||
my $state = $q->escapeHTML($q->param('state')) || "";
|
||||
my $lock_state = $q->escapeHTML($q->param('lock_state')) || "";
|
||||
my $station_state = $q->escapeHTML($q->param('station_state')) || "";
|
||||
my %varenv = $cf->envonline();
|
||||
my $rows = 0;
|
||||
my $user_agent = $q->user_agent();
|
||||
|
@ -801,6 +802,7 @@ sub booking_update(){
|
|||
bike => "$bike",
|
||||
state => "",
|
||||
lock_state => "",
|
||||
station_state => "",
|
||||
co2saving => "",
|
||||
response_state => "OK 1017: No update",
|
||||
response_text => "Es wurden keine Daten aktualisiert",
|
||||
|
@ -960,7 +962,9 @@ sub booking_update(){
|
|||
|
||||
$geo_distance = $lb->geo_fencing($latitude,$longitude,$latitude_station,$longitude_station);
|
||||
#$station_next = $stations_raw->{$id}->{int04};
|
||||
if($geo_distance <= $stations_raw->{$id}->{int06}){
|
||||
#if($geo_distance <= $stations_raw->{$id}->{int06}){
|
||||
#sigo development workaround without geofence
|
||||
if(($geo_distance <= $stations_raw->{$id}->{int06}) || ($record_pos->{int11} == 3)){
|
||||
$geo_distance_next = $geo_distance;
|
||||
#end-Station
|
||||
$update_pos->{int04} = "$stations_raw->{$id}->{int04}";
|
||||
|
@ -1169,12 +1173,13 @@ sub booking_update(){
|
|||
$booking_values->{response_text} = "Abschließen von Fahrrad Nr. " . $q->param('bike') . " bestätigt";
|
||||
}
|
||||
}elsif($lock_state eq "unlocked"){
|
||||
#int11=system >= 3 (sigo) with station_lock
|
||||
#int30=Station Id
|
||||
#int31=Slot Id
|
||||
#int27=velofactur bike Id
|
||||
if($record_cc->{int30} && $record_cc->{int31} && $record_cc->{int27}){
|
||||
$bw->log("unlock velofactur station lock with: '$record_cc->{int30}' '$record_cc->{int31}' '$record_cc->{int27}' 'Freigeben' '$record_pos->{c_id}'","","");
|
||||
system(`$varenv{basedir}/src/scripts/velofaktur_client.pl $varenv{syshost} post_velo "$record_cc->{int30}" "$record_cc->{int31}" "$record_cc->{int27}" "Freigeben" "$record_pos->{c_id}"`);
|
||||
if($record_cc->{int11} && $record_cc->{int11} >=3 && $record_cc->{int30} && $record_cc->{int31} && $record_cc->{int27}){
|
||||
$bw->log("unlock station lock with: '$record_cc->{int30}' '$record_cc->{int31}' '$record_cc->{int27}' 'Freigeben' '$record_pos->{c_id}'","","");
|
||||
#system(`$varenv{basedir}/src/scripts/velofaktur_client.pl $varenv{syshost} post_velo "$record_cc->{int30}" "$record_cc->{int31}" "$record_cc->{int27}" "Freigeben" "$record_pos->{c_id}"`);
|
||||
}
|
||||
$lock_value = 2;
|
||||
$update_cc->{int20} = "$lock_value";
|
||||
|
|
|
@ -1079,7 +1079,7 @@ sub collect_transpos {
|
|||
$where .= " and cp.$key = $search->{$key}" if($key eq "barcode" && looks_like_number($search->{$key}));
|
||||
$where .= " and cp.$key = $search->{$key}" if($key eq "int12" && looks_like_number($search->{$key}));#bike_group
|
||||
$where .= " and cp.$key = $search->{$key}" if($key eq "owner" && looks_like_number($search->{$key}));
|
||||
$where .= " and cp.$key is $search->{$key}" if($key eq "int34" && $search->{$key} eq "null");
|
||||
$where .= " and (cp.$key is $search->{$key} OR cp.$key = 0)" if($key eq "int34" && $search->{$key} eq "null");
|
||||
}
|
||||
|
||||
$where .= " ORDER BY cp.end_time $updown LIMIT $search->{limit} OFFSET $search->{offset}" if($search->{limit});
|
||||
|
|
|
@ -60,8 +60,6 @@ sub admin_tpl(){
|
|||
my $change = $lb->time4de($node_meta->{change},"1") if($node_meta->{change});
|
||||
my $subid = $1 if($node_meta->{main_id} =~ /^(\d)/);
|
||||
|
||||
my $ctf = $db->get_content1("contentuser",$dbt->{shareedms_conf}->{parent_id});
|
||||
|
||||
#Node templates
|
||||
my $tpl_id = 97;#Standard for CMS
|
||||
#Selektierbare Tabellen Layout templates
|
||||
|
@ -79,7 +77,6 @@ sub admin_tpl(){
|
|||
$tpl_lists4selection = 210;
|
||||
}else{
|
||||
$tpl_lists4selection = "224,226,227,228,229";
|
||||
#$tpl_lists4selection .= "," . $ctf->{txt35} if($ctf->{txt35});#pos tpl-id's
|
||||
}
|
||||
}elsif($node_meta->{ct_table} eq "contenttrans"){
|
||||
$tpl_id = "101";
|
||||
|
@ -89,8 +86,7 @@ sub admin_tpl(){
|
|||
$tpl_lists4selection = "221,222";
|
||||
}elsif($node_meta->{ct_table} eq "contentadr" || $node_meta->{ct_table} eq "contentadrpos"){
|
||||
$tpl_id = "101";
|
||||
$tpl_lists4selection = $ctf->{txt38};
|
||||
$tpl_lists4selection .= "," . $ctf->{txt31} if($ctf->{txt31});#pos tpl-id's
|
||||
$tpl_lists4selection = "401,402,403";
|
||||
}
|
||||
|
||||
#Defaults to tpl_id=97
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue