Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Poduptime
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
2
Issues
2
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
diasporg
Poduptime
Commits
b2a6a7f1
Commit
b2a6a7f1
authored
Sep 21, 2014
by
dmorley
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add services from json data and new comments from json
parent
053134c1
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
52 additions
and
4 deletions
+52
-4
css/newstyle.css
css/newstyle.css
+19
-0
db/pull.php
db/pull.php
+18
-2
db/tables.sql
db/tables.sql
+5
-0
show.php
show.php
+10
-2
No files found.
css/newstyle.css
View file @
b2a6a7f1
...
...
@@ -19,3 +19,22 @@ font-size:9px;
.content
{
margin-left
:
2px
!important
;
}
.smlogo
{
width
:
16px
;
height
:
16px
;
background
:
url(../img/smlogo.png)
0
0
;
display
:
inline-block
;
}
#twitter
{
background-position
:
0
-776px
;
}
#facebook
{
background-position
:
0
-824px
;
}
#tumblr
{
background-position
:
0
-792px
;
}
#wordpress
{
background-position
:
0
-656px
;
}
db/pull.php
View file @
b2a6a7f1
...
...
@@ -88,6 +88,11 @@ unset($active_users_halfyear);
unset
(
$active_users_monthly
);
unset
(
$local_posts
);
unset
(
$registrations_open
);
unset
(
$comment_counts
);
unset
(
$service_facebook
);
unset
(
$service_twitter
);
unset
(
$service_tumblr
);
unset
(
$service_wordpess
);
unset
(
$dver
);
unset
(
$dverr
);
unset
(
$xdver
);
...
...
@@ -147,6 +152,11 @@ $total_users = isset($jsonssl->total_users)?$jsonssl->total_users:0;
$active_users_halfyear
=
isset
(
$jsonssl
->
active_users_halfyear
)
?
$jsonssl
->
active_users_halfyear
:
0
;
$active_users_monthly
=
isset
(
$jsonssl
->
active_users_monthly
)
?
$jsonssl
->
active_users_monthly
:
0
;
$local_posts
=
isset
(
$jsonssl
->
local_posts
)
?
$jsonssl
->
local_posts
:
0
;
$comment_counts
=
isset
(
$jsonssl
->
local_comments
)
?
$jsonssl
->
local_comments
:
0
;
$service_facebook
=
isset
(
$jsonssl
->
facebook
)
?
$jsonssl
->
facebook
:
false
;
$service_twitter
=
isset
(
$jsonssl
->
twitter
)
?
$jsonssl
->
twitter
:
false
;
$service_tumblr
=
isset
(
$jsonssl
->
tumblr
)
?
$jsonssl
->
tumblr
:
false
;
$service_wordpress
=
isset
(
$jsonssl
->
wordpress
)
?
$jsonssl
->
wordpress
:
false
;
}
elseif
(
stristr
(
$output
,
'registrations_open'
))
{
"not"
;
$secure
=
"false"
;
//$hidden="no";
...
...
@@ -175,6 +185,11 @@ $total_users = isset($jsonssl->total_users)?$jsonssl->total_users:0;
$active_users_halfyear
=
isset
(
$jsonssl
->
active_users_halfyear
)
?
$jsonssl
->
active_users_halfyear
:
0
;
$active_users_monthly
=
isset
(
$jsonssl
->
active_users_monthly
)
?
$jsonssl
->
active_users_monthly
:
0
;
$local_posts
=
isset
(
$jsonssl
->
local_posts
)
?
$jsonssl
->
local_posts
:
0
;
$comment_counts
=
isset
(
$jsonssl
->
local_comments
)
?
$jsonssl
->
local_comments
:
0
;
$service_facebook
=
isset
(
$jsonssl
->
facebook
)
?
$jsonssl
->
facebook
:
false
;
$service_twitter
=
isset
(
$jsonssl
->
twitter
)
?
$jsonssl
->
twitter
:
false
;
$service_tumblr
=
isset
(
$jsonssl
->
tumblr
)
?
$jsonssl
->
tumblr
:
false
;
$service_wordpress
=
isset
(
$jsonssl
->
wordpress
)
?
$jsonssl
->
wordpress
:
false
;
}
else
{
$secure
=
"false"
;
$score
=
$score
-
1
;
...
...
@@ -309,10 +324,11 @@ $score=$score-2;
$sql
=
"UPDATE pods SET Hgitdate=$1, Hencoding=$2, secure=$3, hidden=$4, Hruntime=$5, Hgitref=$6, ip=$7, ipv6=$8, monthsmonitored=$9,
uptimelast7=$10, status=$11, dateLaststats=$12, dateUpdated=$13, responsetimelast7=$14, score=$15, adminrating=$16, country=$17, city=$18,
state=$19, lat=$20, long=$21, postalcode='', connection=$22, whois=$23, userrating=$24, longversion=$25, shortversion=$26,
masterversion=$27, signup=$28, total_users=$29, active_users_halfyear=$30, active_users_monthly=$31, local_posts=$32, name=$33
masterversion=$27, signup=$28, total_users=$29, active_users_halfyear=$30, active_users_monthly=$31, local_posts=$32, name=$33,
comment_counts=$35, service_facebook=$36, service_tumblr=$37, service_twitter=$38, service_wordpress=$39
WHERE
domain=$34"
;
$result
=
pg_query_params
(
$dbh
,
$sql
,
array
(
$gitdate
,
$encoding
,
$secure
,
$hidden
,
$runtime
,
$gitrev
,
$ipnum
,
$ipv6
,
$months
,
$uptime
,
$live
,
$pingdomdate
,
$timenow
,
$responsetime
,
$score
,
$adminrating
,
$country
,
$city
,
$state
,
$lat
,
$long
,
$dver
,
$whois
,
$userrating
,
$xdver
,
$dver
,
$masterversion
,
$signup
,
$total_users
,
$active_users_halfyear
,
$active_users_monthly
,
$local_posts
,
$name
,
$domain
));
$result
=
pg_query_params
(
$dbh
,
$sql
,
array
(
$gitdate
,
$encoding
,
$secure
,
$hidden
,
$runtime
,
$gitrev
,
$ipnum
,
$ipv6
,
$months
,
$uptime
,
$live
,
$pingdomdate
,
$timenow
,
$responsetime
,
$score
,
$adminrating
,
$country
,
$city
,
$state
,
$lat
,
$long
,
$dver
,
$whois
,
$userrating
,
$xdver
,
$dver
,
$masterversion
,
$signup
,
$total_users
,
$active_users_halfyear
,
$active_users_monthly
,
$local_posts
,
$name
,
$domain
,
$comment_counts
,
$service_facebook
,
$service_tumblr
,
$service_twitter
,
$service_wordpress
));
if
(
!
$result
)
{
die
(
"Error in SQL query3: "
.
pg_last_error
());
}
...
...
db/tables.sql
View file @
b2a6a7f1
...
...
@@ -35,6 +35,11 @@ CREATE TABLE pods (
uptimelast7
numeric
(
5
,
2
),
status
text
,
responsetimelast7
text
,
service_facebook
booleen
,
service_twitter
booleen
,
service_tumblr
booleen
,
service_wordpress
booleen
,
comment_counts
int
,
dateUpdated
timestamp
DEFAULT
current_timestamp
,
dateLaststats
timestamp
DEFAULT
current_timestamp
,
dateCreated
timestamp
DEFAULT
current_timestamp
...
...
show.php
View file @
b2a6a7f1
...
...
@@ -10,9 +10,11 @@
<th>
Total Users
<a
class=
"tipsy"
title=
"Number of total users on this pod."
>
?
</a></th>
<th>
Active Users
<a
class=
"tipsy"
title=
"Number of users active last 6 months on this pod."
>
?
</a></th>
<th>
Posts
<a
class=
"tipsy"
title=
"Number of total posts on this pod."
>
?
</a></th>
<th>
Comments
<a
class=
"tipsy"
title=
"Number of total comments on this pod."
>
?
</a></th>
<th>
Months
<a
class=
"tipsy"
title=
"How many months has this pod been online? Click number for more history."
>
?
</a></th>
<th>
Rating
<a
class=
"tipsy"
title=
"User and Admin rating for this pod."
>
?
</a></th>
<th>
Location
<a
class=
"tipsy"
title=
"Pod location, based on IP Geolocation"
>
?
</a></th>
<th>
Services
<a
class=
"tipsy"
title=
"External Social Networks this pod can post to"
>
?
</a></th>
</tr>
</thead>
<tbody>
...
...
@@ -70,6 +72,7 @@ if ($row["signup"] == 1) {$signup="Open";} else {$signup="Closed";}
echo
"<td>"
.
$row
[
"total_users"
]
.
"</td>"
;
echo
"<td>"
.
$row
[
"active_users_halfyear"
]
.
"</td>"
;
echo
"<td>"
.
$row
[
"local_posts"
]
.
"</td>"
;
echo
"<td>"
.
$row
[
"comment_counts"
]
.
"</td>"
;
if
(
strpos
(
$row
[
"pingdomurl"
],
"pingdom.com"
))
{
$moreurl
=
$row
[
"pingdomurl"
];}
else
{
$moreurl
=
"http://api.uptimerobot.com/getMonitors?format=json&customUptimeRatio=7-30-60-90&apiKey="
.
$row
[
"pingdomurl"
];}
echo
"<td><div title='Last Check "
.
$row
[
"dateupdated"
]
.
"' class='tipsy'><a target='new' href='"
.
$moreurl
.
"'>"
.
$row
[
"monthsmonitored"
]
.
"</a></div></td>"
;
if
(
$row
[
"userrating"
]
>
6
)
{
$userratingclass
=
"green"
;}
elseif
(
$row
[
"userrating"
]
<
7
)
{
$userratingclass
=
"yellow"
;}
elseif
(
$row
[
"userrating"
]
<
3
)
{
$userratingclass
=
"red"
;}
...
...
@@ -85,8 +88,13 @@ echo "✪";
}
echo
"</div></a></td>"
;
echo
"<td class='tipsy' title='"
.
$row
[
"whois"
]
.
" '>"
.
$row
[
"country"
]
.
"</td></tr>
\n
"
;
echo
"<td class='tipsy' title='"
.
$row
[
"whois"
]
.
" '>"
.
$row
[
"country"
]
.
"</td>
\n
"
;
echo
"<td class='' title=''>"
;
if
(
$row
[
"service_facebook"
]
==
true
)
{
echo
"<div id='facebook' class='smlogo'></div>"
;}
if
(
$row
[
"service_twitter"
]
==
true
)
{
echo
"<div id='twitter' class='smlogo'></div>"
;}
if
(
$row
[
"service_tumblr"
]
==
true
)
{
echo
"<div id='tumblr' class='smlogo'></div>"
;}
if
(
$row
[
"service_wordpress"
]
==
true
)
{
echo
"<div id='wordpress' class='smlogo'></div>"
;}
echo
"</td></tr>
\n
"
;
}
pg_free_result
(
$result
);
pg_close
(
$dbh
);
...
...
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