Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
alternc
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
domainepublic
alternc
Commits
ac9e50ac
Commit
ac9e50ac
authored
Mar 28, 2014
by
Alan Garcia
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Doc + cosmetics
parent
bc386f90
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
29 additions
and
15 deletions
+29
-15
bureau/admin/bro_main.php
bureau/admin/bro_main.php
+2
-2
bureau/class/m_bro.php
bureau/class/m_bro.php
+4
-5
bureau/class/m_dom.php
bureau/class/m_dom.php
+7
-1
bureau/class/m_ftp.php
bureau/class/m_ftp.php
+5
-2
bureau/class/m_mem.php
bureau/class/m_mem.php
+10
-4
src/export_account.php
src/export_account.php
+1
-1
No files found.
bureau/admin/bro_main.php
View file @
ac9e50ac
...
@@ -361,13 +361,13 @@ function actmoveto_not_empty() {
...
@@ -361,13 +361,13 @@ function actmoveto_not_empty() {
}
else
{
}
else
{
echo
"<td> "
;
echo
"<td> "
;
}
}
$e
=
$bro
->
is_extractable
(
$
R
,
$
c
[
$i
][
"name"
]);
$e
=
$bro
->
is_extractable
(
$c
[
$i
][
"name"
]);
if
(
$e
)
{
if
(
$e
)
{
echo
" <a href=
\"
bro_main.php?actextract=1&fileextract="
.
urlencode
(
$c
[
$i
][
"name"
])
.
"&R="
.
urlencode
(
$R
)
.
"
\"
>"
;
echo
" <a href=
\"
bro_main.php?actextract=1&fileextract="
.
urlencode
(
$c
[
$i
][
"name"
])
.
"&R="
.
urlencode
(
$R
)
.
"
\"
>"
;
echo
_
(
"Extract"
);
echo
_
(
"Extract"
);
echo
"</a>"
;
echo
"</a>"
;
}
}
$ez
=
$bro
->
is_sqlfile
(
$
R
,
$
c
[
$i
][
"name"
]);
$ez
=
$bro
->
is_sqlfile
(
$c
[
$i
][
"name"
]);
if
(
$ez
)
{
if
(
$ez
)
{
echo
" <a href=
\"
javascript:;
\"
onClick=
\"
$('#rest_db_
$i
').toggle();
\"
>"
;
echo
" <a href=
\"
javascript:;
\"
onClick=
\"
$('#rest_db_
$i
').toggle();
\"
>"
;
echo
_
(
"Restore SQL"
);
echo
_
(
"Restore SQL"
);
...
...
bureau/class/m_bro.php
View file @
ac9e50ac
...
@@ -894,11 +894,10 @@ class m_bro {
...
@@ -894,11 +894,10 @@ class m_bro {
/**
/**
* Return a HTML snippet representing an extraction function only if the mimetype of $name is supported
* Return a HTML snippet representing an extraction function only if the mimetype of $name is supported
*
*
* @param string $dir
* @param string $name
* @param string $name
* @return boolean
* @return boolean
*/
*/
function
is_extractable
(
$
dir
,
$
name
)
{
function
is_extractable
(
$name
)
{
if
(
$parts
=
explode
(
"."
,
$name
))
{
if
(
$parts
=
explode
(
"."
,
$name
))
{
$ext
=
array_pop
(
$parts
);
$ext
=
array_pop
(
$parts
);
switch
(
$ext
)
{
switch
(
$ext
)
{
...
@@ -929,10 +928,10 @@ class m_bro {
...
@@ -929,10 +928,10 @@ class m_bro {
* @param type $name
* @param type $name
* @return boolean
* @return boolean
*/
*/
function
is_sqlfile
(
$
dir
,
$
name
)
{
function
is_sqlfile
(
$name
)
{
if
(
$parts
=
explode
(
"."
,
$name
))
{
if
(
$parts
=
explode
(
"."
,
$name
))
{
$ext
=
array_pop
(
$parts
);
$ext
=
array_pop
(
$parts
);
$ext2
=
array_pop
(
$parts
)
.
'.'
.
$ext
;
$ext2
=
array_pop
(
$parts
)
.
'.'
.
$ext
;
if
(
$ext
==
'sql'
or
$ext2
==
'sql.gz'
)
return
true
;
if
(
$ext
==
'sql'
or
$ext2
==
'sql.gz'
)
return
true
;
}
}
return
false
;
return
false
;
...
...
bureau/class/m_dom.php
View file @
ac9e50ac
...
@@ -180,6 +180,9 @@ class m_dom {
...
@@ -180,6 +180,9 @@ class m_dom {
return
$r
;
return
$r
;
}
}
/**
* @param integer $type
*/
function
domains_type_target_values
(
$type
=
null
)
{
function
domains_type_target_values
(
$type
=
null
)
{
global
$db
,
$err
,
$cuid
;
global
$db
,
$err
,
$cuid
;
$err
->
log
(
"dom"
,
"domains_type_target_values"
);
$err
->
log
(
"dom"
,
"domains_type_target_values"
);
...
@@ -825,6 +828,9 @@ class m_dom {
...
@@ -825,6 +828,9 @@ class m_dom {
}
}
}
}
/**
* @param string $domain
*/
function
domdefaultdir
(
$domain
)
{
function
domdefaultdir
(
$domain
)
{
global
$bro
,
$cuid
;
global
$bro
,
$cuid
;
$dest_root
=
$bro
->
get_userid_root
(
$cuid
);
$dest_root
=
$bro
->
get_userid_root
(
$cuid
);
...
@@ -1476,7 +1482,7 @@ class m_dom {
...
@@ -1476,7 +1482,7 @@ class m_dom {
$domaine
=
$this
->
get_domain_byid
(
$dom_id
);
$domaine
=
$this
->
get_domain_byid
(
$dom_id
);
$d
=
$this
->
get_domain_all
(
$domaine
);
$d
=
$this
->
get_domain_all
(
$domaine
);
$j
=
$this
->
edit_domain
(
$domaine
,
$d
[
'dns'
],
$d
[
'mail'
],
0
,
$ttl
);
$j
=
$this
->
edit_domain
(
$domaine
,
$d
[
'dns'
],
$d
[
'mail'
],
false
,
$ttl
);
$this
->
unlock
();
$this
->
unlock
();
return
$j
;
return
$j
;
}
}
...
...
bureau/class/m_ftp.php
View file @
ac9e50ac
...
@@ -205,7 +205,11 @@ class m_ftp {
...
@@ -205,7 +205,11 @@ class m_ftp {
return
$r
;
return
$r
;
}
}
// Check if the login is fine (syntax)
/**
* Check if the login is fine (syntax)
*
* @param string $l
*/
function
check_login
(
$l
)
{
function
check_login
(
$l
)
{
global
$err
;
global
$err
;
...
@@ -419,7 +423,6 @@ class m_ftp {
...
@@ -419,7 +423,6 @@ class m_ftp {
/* ----------------------------------------------------------------- */
/* ----------------------------------------------------------------- */
/** Fonction appelle par membres quand un membre est effac.
/** Fonction appelle par membres quand un membre est effac.
* @param integer $uid Numro de membre effac.
* @access private
* @access private
*/
*/
function
alternc_del_member
()
{
function
alternc_del_member
()
{
...
...
bureau/class/m_mem.php
View file @
ac9e50ac
...
@@ -209,6 +209,9 @@ class m_mem {
...
@@ -209,6 +209,9 @@ class m_mem {
return
md5
(
"
$i
--"
.
$db
->
f
(
'pass'
));
return
md5
(
"
$i
--"
.
$db
->
f
(
'pass'
));
}
}
/**
* @param boolean $t
*/
function
authip_tokencheck
(
$t
)
{
function
authip_tokencheck
(
$t
)
{
if
(
$t
==
$this
->
authip_token
()
||
$t
==
$this
->
authip_token
(
true
)
)
return
true
;
if
(
$t
==
$this
->
authip_token
()
||
$t
==
$this
->
authip_token
(
true
)
)
return
true
;
return
false
;
return
false
;
...
@@ -234,7 +237,7 @@ class m_mem {
...
@@ -234,7 +237,7 @@ class m_mem {
* et AVANT d'mettre des donnes. (un cookie peut tre envoy)
* et AVANT d'mettre des donnes. (un cookie peut tre envoy)
* @global string $session Le cookie de session eventuel
* @global string $session Le cookie de session eventuel
* @global string $username/password le login/pass de l'utilisateur
* @global string $username/password le login/pass de l'utilisateur
* @return TRUE si la session est correcte, FALSE sinon.
* @return
boolean
TRUE si la session est correcte, FALSE sinon.
*/
*/
function
checkid
()
{
function
checkid
()
{
global
$db
,
$err
,
$cuid
,
$restrictip
,
$authip
;
global
$db
,
$err
,
$cuid
,
$restrictip
,
$authip
;
...
@@ -310,7 +313,7 @@ class m_mem {
...
@@ -310,7 +313,7 @@ class m_mem {
/* ----------------------------------------------------------------- */
/* ----------------------------------------------------------------- */
/** Retourne a l'identite d'origine de l'utilisateur apres su.
/** Retourne a l'identite d'origine de l'utilisateur apres su.
* @return TRUE si la session est correcte, FALSE sinon.
* @return
boolean
TRUE si la session est correcte, FALSE sinon.
*/
*/
function
unsu
()
{
function
unsu
()
{
global
$cuid
,
$mysql
;
global
$cuid
,
$mysql
;
...
@@ -524,7 +527,7 @@ Cordially.
...
@@ -524,7 +527,7 @@ Cordially.
* @param string $COOKIE Cookie envoy par mail
* @param string $COOKIE Cookie envoy par mail
* @param string $KEY cl affiche l'cran
* @param string $KEY cl affiche l'cran
* @param integer $uid Utilisateur concern (on est hors session)
* @param integer $uid Utilisateur concern (on est hors session)
* @return TRUE si le mail a bien t modifi, FALSE sinon
* @return
boolean
TRUE si le mail a bien t modifi, FALSE sinon
*/
*/
function
ChangeMail2
(
$COOKIE
,
$KEY
,
$uid
)
{
function
ChangeMail2
(
$COOKIE
,
$KEY
,
$uid
)
{
global
$err
,
$db
,
$L_HOSTING
,
$L_FQDN
;
global
$err
,
$db
,
$L_HOSTING
,
$L_FQDN
;
...
@@ -567,7 +570,7 @@ Cordially.
...
@@ -567,7 +570,7 @@ Cordially.
/* ----------------------------------------------------------------- */
/* ----------------------------------------------------------------- */
/** Affiche (echo) l'aide contextuelle
/** Affiche (echo) l'aide contextuelle
* @param integer $file Numro de fichier d'aide afficher.
* @param integer $file Numro de fichier d'aide afficher.
* @return TRUE si l'aide contextuelle a t trouve, FALSE sinon
* @return
boolean
TRUE si l'aide contextuelle a t trouve, FALSE sinon
*/
*/
function
show_help
(
$file
,
$force
=
false
)
{
function
show_help
(
$file
,
$force
=
false
)
{
global
$err
;
global
$err
;
...
@@ -586,6 +589,9 @@ Cordially.
...
@@ -586,6 +589,9 @@ Cordially.
}
}
}
}
/**
* @param integer $uid
*/
function
get_creator_by_uid
(
$uid
)
{
function
get_creator_by_uid
(
$uid
)
{
global
$db
,
$err
;
global
$db
,
$err
;
$err
->
log
(
"dom"
,
"get_creator_by_uid"
);
$err
->
log
(
"dom"
,
"get_creator_by_uid"
);
...
...
src/export_account.php
View file @
ac9e50ac
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
// EXPERIMENTAL : user data export.
// EXPERIMENTAL : user data export.
die
(
'Proof of concept'
);
die
(
'Proof of concept'
);
include
(
"config
.php"
);
require_once
(
"/usr/share/alternc/panel/class/config_nochk
.php"
);
sem_release
(
$alternc_sem
);
sem_release
(
$alternc_sem
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment