96649f21ba18d07757afa9d98998f7a22c0d86a3
bernd zusätzliche include auch in...

bernd authored 17 years ago

modules/vmail/include/hasdomain.php  1) <?php
Bernd Wurst Added license tags for CC0,...

Bernd Wurst authored 12 years ago

modules/email/include/hasdomain.php  2) /*
modules/email/include/hasdomain.php  3) This file belongs to the Webinterface of schokokeks.org Hosting
modules/email/include/hasdomain.php  4) 
Bernd Wurst Copyright year update

Bernd Wurst authored 6 years ago

modules/email/include/hasdomain.php  5) Written 2008-2018 by schokokeks.org Hosting, namely
Bernd Wurst Added license tags for CC0,...

Bernd Wurst authored 12 years ago

modules/email/include/hasdomain.php  6)   Bernd Wurst <bernd@schokokeks.org>
modules/email/include/hasdomain.php  7)   Hanno Böck <hanno@schokokeks.org>
modules/email/include/hasdomain.php  8) 
modules/email/include/hasdomain.php  9) To the extent possible under law, the author(s) have dedicated all copyright and related and neighboring rights to this software to the public domain worldwide. This software is distributed without any warranty.
modules/email/include/hasdomain.php 10) 
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/email/include/hasdomain.php 11) You should have received a copy of the CC0 Public Domain Dedication along with this software. If not, see
Bernd Wurst Added license tags for CC0,...

Bernd Wurst authored 12 years ago

modules/email/include/hasdomain.php 12) http://creativecommons.org/publicdomain/zero/1.0/
modules/email/include/hasdomain.php 13) 
modules/email/include/hasdomain.php 14) Nevertheless, in case you use a significant part of this code, we ask (but not require, see the license) that you keep the authors' names in place and return your changes to the public. We would be especially happy if you tell us what you're going to do with this code.
modules/email/include/hasdomain.php 15) */
bernd zusätzliche include auch in...

bernd authored 17 years ago

modules/vmail/include/hasdomain.php 16) 
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/email/include/hasdomain.php 17) if (! function_exists("user_has_vmail_domain")) {
modules/email/include/hasdomain.php 18)     function user_has_vmail_domain()
modules/email/include/hasdomain.php 19)     {
modules/email/include/hasdomain.php 20)         $role = $_SESSION['role'];
modules/email/include/hasdomain.php 21)         if (! ($role & ROLE_SYSTEMUSER)) {
modules/email/include/hasdomain.php 22)             return false;
modules/email/include/hasdomain.php 23)         }
modules/email/include/hasdomain.php 24)         $uid = (int) $_SESSION['userinfo']['uid'];
Hanno Böck Codingstyle PSR12 + array s...

Hanno Böck authored 3 years ago

modules/email/include/hasdomain.php 25)         $result = db_query("SELECT COUNT(*) FROM mail.v_vmail_domains WHERE useraccount=?", [$uid]);
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/email/include/hasdomain.php 26)         $row = $result->fetch();
modules/email/include/hasdomain.php 27)         $count = $row[0];
modules/email/include/hasdomain.php 28)         DEBUG("User has {$count} vmail-domains");
modules/email/include/hasdomain.php 29)         return ((int) $count > 0);
modules/email/include/hasdomain.php 30)     }
bernd zusätzliche include auch in...

bernd authored 17 years ago

modules/vmail/include/hasdomain.php 31) }
modules/vmail/include/hasdomain.php 32) 
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/email/include/hasdomain.php 33) if (! function_exists("user_has_dotcourier_domain")) {
modules/email/include/hasdomain.php 34)     function user_has_dotcourier_domain()
modules/email/include/hasdomain.php 35)     {
modules/email/include/hasdomain.php 36)         $role = $_SESSION['role'];
modules/email/include/hasdomain.php 37)         if (! ($role & ROLE_SYSTEMUSER)) {
modules/email/include/hasdomain.php 38)             return false;
modules/email/include/hasdomain.php 39)         }
modules/email/include/hasdomain.php 40)         $uid = (int) $_SESSION['userinfo']['uid'];
modules/email/include/hasdomain.php 41)         $result = db_query("select 1 from mail.custom_mappings as c left join mail.v_domains as d on (d.id=c.domain) where d.user=:uid or c.uid=:uid UNION ".
Hanno Böck Codingstyle PSR12 + array s...

Hanno Böck authored 3 years ago

modules/email/include/hasdomain.php 42)             "SELECT 1 FROM mail.v_domains AS d WHERE d.user=:uid AND d.mail != 'none' AND d.id != ALL(SELECT domain FROM mail.virtual_mail_domains)", [":uid" => $uid]);
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/email/include/hasdomain.php 43)         $ret = ($result->rowCount() > 0);
modules/email/include/hasdomain.php 44)         if ($ret) {
modules/email/include/hasdomain.php 45)             DEBUG("User {$uid} has dotcourier-domains");
Bernd Wurst fix undefined variable

Bernd Wurst authored 5 years ago

modules/email/include/hasdomain.php 46)             return true;
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/email/include/hasdomain.php 47)         }
Bernd Wurst fix undefined variable

Bernd Wurst authored 5 years ago

modules/email/include/hasdomain.php 48)         return false;
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

modules/email/include/hasdomain.php 49)     }