$table = $modx->getTableName('modResource');
$sql = "INSERT INTO {$table} (pagetitle, longtitle, menutitle, alias, parent, isfolder, template, published, hidemenu, content, createdby, createdon, editedby, editedon) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)";
$q = $modx->prepare($sql);
$q->bindValue(1, $line['pagetitle']);
$q->bindValue(2, $line['longtitle']);
$q->bindValue(3, $line['menutitle']);
$q->bindValue(4, $line['alias']);
$q->bindValue(5, $line['parent']);
$q->bindValue(6, $line['isfolder']);
$q->bindValue(7, $line['template']);
$q->bindValue(8, '1');
$q->bindValue(9, $line['hidemenu']);
$q->bindValue(10, $line['content']);
$q->bindValue(11, 1);
$q->bindValue(12, date());
$q->bindValue(13, 1);
$q->bindValue(14, date());
$q->execute();